mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
add error to module show callback
This commit is contained in:
parent
3c357f057b
commit
2324579057
@ -295,6 +295,7 @@ var MM = (function () {
|
||||
// Otherwise cancel show action.
|
||||
if (module.lockStrings.length !== 0 && options.force !== true) {
|
||||
Log.log("Will not show " + module.name + ". LockStrings active: " + module.lockStrings.join(","));
|
||||
callback("Active lock strings");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -321,13 +322,13 @@ var MM = (function () {
|
||||
clearTimeout(module.showHideTimer);
|
||||
module.showHideTimer = setTimeout(function () {
|
||||
if (typeof callback === "function") {
|
||||
callback();
|
||||
callback(null);
|
||||
}
|
||||
}, speed);
|
||||
} else {
|
||||
// invoke callback
|
||||
if (typeof callback === "function") {
|
||||
callback();
|
||||
callback(null);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -432,9 +432,11 @@ var Module = Class.extend({
|
||||
MM.showModule(
|
||||
this,
|
||||
speed,
|
||||
function () {
|
||||
self.resume();
|
||||
callback();
|
||||
function (error) {
|
||||
if (!error) {
|
||||
self.resume();
|
||||
}
|
||||
callback(error);
|
||||
},
|
||||
options
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user