diff --git a/app/javascript/src/notifier.js b/app/javascript/src/notifier.js index f9c6efe3e3..663e785610 100644 --- a/app/javascript/src/notifier.js +++ b/app/javascript/src/notifier.js @@ -13,7 +13,7 @@ class Notification { } getText () { - + return this.notificationElement.children('span').text() } isDismissable () { @@ -28,8 +28,9 @@ class Notification { } - setText () { - + setText (newText) { + TypeChecker.checkString(newText, 'newText') + return this.notificationElement.children('span').text(newText) } toggleDismissable () { @@ -91,7 +92,7 @@ class Notifier { } const dismissButtonAsHTML = isDismissable ? `` : '' - const newNotification = + const newNotificationAsJQuery = $( `