Fix hint helper alert
Change-Id: I6e1ac9fa03f62bd25b1139764d727922a5f61c20
diff --git a/dev/js/src/hint/alert.js b/dev/js/src/hint/alert.js
index 7847af2..f142890 100644
--- a/dev/js/src/hint/alert.js
+++ b/dev/js/src/hint/alert.js
@@ -30,9 +30,12 @@
* Show alert.
*/
show : function (msg) {
- this.active = true;
const e = this._el;
- e.textContent = msg;
+ if (msg !== undefined)
+ e.textContent = msg;
+ if (e.textContent == "")
+ return;
+ this.active = true;
e.style.display = 'block';
},
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 13904ec..7be0a13 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -307,6 +307,7 @@
if (hint) {
shiftContent();
observer.disconnect();
+ KorAP.Hint.alert().show();
}
}
}