mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 20:55:30 +02:00
Ensure top() exists before attempting to return instance
This commit is contained in:
parent
6af0861dfe
commit
32fe815ea2
1 changed files with 4 additions and 1 deletions
|
@ -145,5 +145,8 @@ MenuStack.prototype.goto = function(name, options, cb) {
|
||||||
};
|
};
|
||||||
|
|
||||||
MenuStack.prototype.getCurrentModule = function() {
|
MenuStack.prototype.getCurrentModule = function() {
|
||||||
return this.top().instance;
|
var top = this.top();
|
||||||
|
if(top) {
|
||||||
|
return top.instance;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue