From 4ad101f5d40cffd8ff85b7e0c4bfd243f65b4352 Mon Sep 17 00:00:00 2001 From: Karishma Chadha Date: Thu, 20 Dec 2018 14:12:33 -0500 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: mzgoddard --- src/virtual-machine.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/virtual-machine.js b/src/virtual-machine.js index 7acd670c1..c19098ec8 100644 --- a/src/virtual-machine.js +++ b/src/virtual-machine.js @@ -310,12 +310,12 @@ class VirtualMachine extends EventEmitter { // The project appears to be a Scratch 1 file but it // could not be successfully translated into a Scratch 2 // project. - throw sb1Error; + return Promise.reject(sb1Error); } } - // Through original error since the input does not appear to be + // Throw original error since the input does not appear to be // an SB1File. - throw error; + return Promise.reject(error); }); return validationPromise