diff --git a/src/public/app/dialogs/jump_to_note.js b/src/public/app/dialogs/jump_to_note.js index 037fd5b2d..87e4e72b2 100644 --- a/src/public/app/dialogs/jump_to_note.js +++ b/src/public/app/dialogs/jump_to_note.js @@ -30,6 +30,9 @@ export async function showDialog() { } else { $autoComplete + // hack, the actual search value is stored in
element next to the search input
+ // this is important because the search input value is replaced with the suggestion note's title
+ .autocomplete("val", $autoComplete.next().text())
.trigger('focus')
.trigger('select');
}
diff --git a/src/services/cls.js b/src/services/cls.js
index c1f8ff609..c70212606 100644
--- a/src/services/cls.js
+++ b/src/services/cls.js
@@ -6,7 +6,14 @@ function init(callback) {
}
function wrap(callback) {
- return () => init(callback);
+ return () => {
+ try {
+ init(callback);
+ }
+ catch (e) {
+ console.log(`Error occurred: ${e.message}: ${e.stack}`);
+ }
+ }
}
function get(key) {