diff --git a/core/menu_stack.js b/core/menu_stack.js index f8bc18f6..ed855897 100644 --- a/core/menu_stack.js +++ b/core/menu_stack.js @@ -145,5 +145,8 @@ MenuStack.prototype.goto = function(name, options, cb) { }; MenuStack.prototype.getCurrentModule = function() { - return this.top().instance; + var top = this.top(); + if(top) { + return top.instance; + } };