From 0707c4bcc8668553d06df9fa05894cd09b58a7b9 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Fri, 2 Dec 2016 15:35:35 -0500 Subject: [PATCH] Update index.js --- src/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 8d7a9f74c..0fb9efbf3 100644 --- a/src/index.js +++ b/src/index.js @@ -156,19 +156,16 @@ VirtualMachine.prototype.loadProject = function (json) { }; VirtualMachine.prototype.exportToJson = function () { - this.clear(); var obj = new Object(); var i = 0; - obj.sprites = []; - for (; i < this.runtime.targets; i++) { - obj.sprites.push(this.runtime.targets[i].export()); - } + obj.sprites = this.runtime.targets; obj.meta.name = 'WIP'; obj.meta.useragent = navigator.userAgent; return JSON.stringify(obj); }; VirtualMachine.prototype.importFromJson = function (json) { + this.clear(); var obj = JSON.parse(json); var i = 0; for (; i < obj.sprites.length; i++) {