diff --git a/core/Commands.js b/core/Commands.js index 2ca50e02..00031f85 100644 --- a/core/Commands.js +++ b/core/Commands.js @@ -65,6 +65,7 @@ var Commands = { ALLOW_DEFAULT: 34, PREVENT_DEFAULT: 35, UNSUBSCRIBE: 36, + REMOVE_SCENE: 37, prettyPrint: function (buffer, start, count) { var callback; start = start ? start : 0; @@ -85,7 +86,7 @@ var commandPrinters = []; commandPrinters[Commands.INIT_DOM] = function init_dom (buffer, data) { data.result += data.i + '. INIT_DOM\n tagName: ' + buffer[++data.i] + '\n\n'; -}; +}; commandPrinters[Commands.DOM_RENDER_SIZE] = function dom_render_size (buffer, data) { data.result += data.i + '. DOM_RENDER_SIZE\n selector: ' + buffer[++data.i] + '\n\n'; @@ -210,4 +211,3 @@ commandPrinters[Commands.NEED_SIZE_FOR] = function need_size_for (buffer, data) }; module.exports = Commands; - diff --git a/core/FamousEngine.js b/core/FamousEngine.js index 5037ba61..f38a40d3 100644 --- a/core/FamousEngine.js +++ b/core/FamousEngine.js @@ -403,9 +403,9 @@ FamousEngine.prototype.removeScene = function removeScene (scene) { var current = this._scenes[selector]; if (current && current === scene) { - this._messages.push(Commands.WITH, selector, Commands.REMOVE_SCENE); if (scene.isMounted()) scene.dismount(); delete this._scenes[selector]; + this._messages.push(Commands.WITH, selector, Commands.REMOVE_SCENE); } return this; };