Skip to content

Commit 56a6725

Browse files
committed
fix bookmark editor cleanup
1 parent 79d5976 commit 56a6725

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

js/searchbar/bookmarkEditor.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ const bookmarkEditor = {
122122
},
123123
show: function (url, replaceItem, onClose, options) {
124124
if (bookmarkEditor.currentInstance) {
125-
if (bookmarkEditor.currentInstance.editor.parentNode) {
125+
if (bookmarkEditor.currentInstance.editor && bookmarkEditor.currentInstance.editor.parentNode) {
126126
bookmarkEditor.currentInstance.editor.remove();
127-
if (bookmark.currentInstance.onClose) {
128-
bookmarkEditor.currentInstance.onClose(bookmarkEditor.currentInstance.bookmark);
129-
}
127+
}
128+
if (bookmarkEditor.currentInstance.onClose) {
129+
bookmarkEditor.currentInstance.onClose(bookmarkEditor.currentInstance.bookmark);
130130
}
131131
bookmarkEditor.currentInstance = null;
132132
}

0 commit comments

Comments
 (0)