mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +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.
|
// Otherwise cancel show action.
|
||||||
if (module.lockStrings.length !== 0 && options.force !== true) {
|
if (module.lockStrings.length !== 0 && options.force !== true) {
|
||||||
Log.log("Will not show " + module.name + ". LockStrings active: " + module.lockStrings.join(","));
|
Log.log("Will not show " + module.name + ". LockStrings active: " + module.lockStrings.join(","));
|
||||||
|
callback("Active lock strings");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,13 +322,13 @@ var MM = (function () {
|
|||||||
clearTimeout(module.showHideTimer);
|
clearTimeout(module.showHideTimer);
|
||||||
module.showHideTimer = setTimeout(function () {
|
module.showHideTimer = setTimeout(function () {
|
||||||
if (typeof callback === "function") {
|
if (typeof callback === "function") {
|
||||||
callback();
|
callback(null);
|
||||||
}
|
}
|
||||||
}, speed);
|
}, speed);
|
||||||
} else {
|
} else {
|
||||||
// invoke callback
|
// invoke callback
|
||||||
if (typeof callback === "function") {
|
if (typeof callback === "function") {
|
||||||
callback();
|
callback(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -432,9 +432,11 @@ var Module = Class.extend({
|
|||||||
MM.showModule(
|
MM.showModule(
|
||||||
this,
|
this,
|
||||||
speed,
|
speed,
|
||||||
function () {
|
function (error) {
|
||||||
self.resume();
|
if (!error) {
|
||||||
callback();
|
self.resume();
|
||||||
|
}
|
||||||
|
callback(error);
|
||||||
},
|
},
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user