From bce42945293f8509f2dfc3c66ad7f44e0d3be23a Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 23 Mar 2018 17:29:08 +0000 Subject: [PATCH] Fix Mark loading state logic --- ElectronClient/app/gui/note-viewer/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElectronClient/app/gui/note-viewer/index.html b/ElectronClient/app/gui/note-viewer/index.html index 7325604bbf..c7ddabccbd 100644 --- a/ElectronClient/app/gui/note-viewer/index.html +++ b/ElectronClient/app/gui/note-viewer/index.html @@ -185,7 +185,6 @@ if (!keywords.length && !markLoaded_) return; if (!markLoaded_) { - markLoaded_ = true; const script = document.createElement('script'); script.onload = function() { setMarkers(keywords); @@ -193,6 +192,7 @@ script.src = '../../node_modules/mark.js/dist/mark.min.js'; document.getElementById('markScriptContainer').appendChild(script); + markLoaded_ = true; } else { setMarkers(keywords); }