1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-12 08:54:00 +02:00

Fix Mark loading state logic

This commit is contained in:
Laurent Cozic 2018-03-23 17:29:08 +00:00
parent de409b632a
commit bce4294529

View File

@ -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);
}