diff --git a/src/engine/blocks.js b/src/engine/blocks.js index 9f6d8b99b..05de4e7e6 100644 --- a/src/engine/blocks.js +++ b/src/engine/blocks.js @@ -674,8 +674,6 @@ class Blocks { } } - // TODO maybe track actual changes, - // but for now, emit a project change always this.emitProjectChanged(); this.resetCache(); diff --git a/src/virtual-machine.js b/src/virtual-machine.js index 0db45536b..68f888257 100644 --- a/src/virtual-machine.js +++ b/src/virtual-machine.js @@ -562,15 +562,14 @@ class VirtualMachine extends EventEmitter { .then(validatedInput => { const projectVersion = validatedInput[0].projectVersion; if (projectVersion === 2) { - return this._addSprite2(validatedInput[0], validatedInput[1]) - .then(() => this.runtime.emitProjectChanged()); + return this._addSprite2(validatedInput[0], validatedInput[1]); } if (projectVersion === 3) { - return this._addSprite3(validatedInput[0], validatedInput[1]) - .then(() => this.runtime.emitProjectChanged()); + return this._addSprite3(validatedInput[0], validatedInput[1]); } return Promise.reject(`${errorPrefix} Unable to verify sprite version.`); }) + .then(() => this.runtime.emitProjectChanged()) .catch(error => { // Intentionally rejecting here (want errors to be handled by caller) if (error.hasOwnProperty('validationError')) {