JI-1059 Fix not showing toast if it is disabled

pull/61/head
Thomas Marstrander 2019-04-01 15:10:37 +02:00
parent 75453e872c
commit ada2f4009d
1 changed files with 4 additions and 3 deletions

View File

@ -190,6 +190,9 @@ H5P.RequestQueue = (function ($, EventDispatcher) {
* @param {string} msg Message to display
*/
RequestQueue.prototype.displayToastMessage = function (msg) {
if (!this.showToast) {
return;
}
H5P.attachToastTo(
H5P.jQuery('.h5p-content:first')[0],
msg,
@ -221,9 +224,7 @@ H5P.RequestQueue = (function ($, EventDispatcher) {
this.resumeQueue();
}
if (this.showToast) {
this.displayToastMessage(message);
}
this.displayToastMessage(message);
};
return RequestQueue;