Skip to content

Commit

Permalink
fix: Add missing REMOVE_SCENE command again
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderGugel committed Jul 17, 2015
1 parent d180569 commit 9b9035c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/Commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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';
Expand Down Expand Up @@ -210,4 +211,3 @@ commandPrinters[Commands.NEED_SIZE_FOR] = function need_size_for (buffer, data)
};

module.exports = Commands;

2 changes: 1 addition & 1 deletion core/FamousEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit 9b9035c

Please sign in to comment.