mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 12:41:45 +02:00
fix: crashes in various places
This commit is contained in:
@@ -6,7 +6,7 @@ function SimpleEditor(props) {
|
||||
const { delta, container, id, pref } = props;
|
||||
useEffect(() => {
|
||||
const toolbar = document.querySelector(`${container} .ql-toolbar.ql-snow`);
|
||||
toolbar.remove();
|
||||
if (toolbar) toolbar.remove();
|
||||
}, [container]);
|
||||
return (
|
||||
<Suspense fallback={<EditorLoading />}>
|
||||
|
||||
@@ -136,7 +136,7 @@ class EditorStore extends BaseStore {
|
||||
|
||||
saveLastOpenedNote(!this.get().session.locked && id);
|
||||
|
||||
if (!oldSession.index) {
|
||||
if (!oldSession?.index) {
|
||||
setHashParam({ note: id }, false);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -223,9 +223,13 @@ function Settings(props) {
|
||||
sx={{ borderColor: "error" }}
|
||||
variant="list"
|
||||
onClick={async () => {
|
||||
// if (await showAccountDeleteConfirmation(user.username)) {
|
||||
// await db.user.deleteUser();
|
||||
// }
|
||||
return showPasswordDialog(
|
||||
"delete_account",
|
||||
async ({ password }) => {
|
||||
await db.user.deleteUser(password);
|
||||
return true;
|
||||
}
|
||||
);
|
||||
}}
|
||||
>
|
||||
<TextWithTip
|
||||
|
||||
@@ -8973,9 +8973,21 @@ normalize-url@^3.0.0, normalize-url@^3.0.1:
|
||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559"
|
||||
integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
|
||||
|
||||
notes-core@../notes-core:
|
||||
version "5.2.0"
|
||||
dependencies:
|
||||
fast-sort "^2.0.1"
|
||||
fuzzysearch "^1.0.3"
|
||||
jshashes "^1.0.8"
|
||||
no-internet "^1.5.2"
|
||||
qclone "^1.0.4"
|
||||
quill-delta-to-html "^0.12.0"
|
||||
quill-delta-to-markdown "https://github.com/streetwriters/quill-delta-to-markdown"
|
||||
transfun "^1.0.2"
|
||||
|
||||
"notes-core@git+ssh://git@github.com:streetwriters/notesnook-core.git":
|
||||
version "5.1.0"
|
||||
resolved "git+ssh://git@github.com:streetwriters/notesnook-core.git#9abccbc225808b435df55910b9e54f21a695ae6b"
|
||||
version "5.2.0"
|
||||
resolved "git+ssh://git@github.com:streetwriters/notesnook-core.git#6af45d70b085e39e74c414448649cbb04f68689e"
|
||||
dependencies:
|
||||
fast-sort "^2.0.1"
|
||||
fuzzysearch "^1.0.3"
|
||||
|
||||
Reference in New Issue
Block a user