Skip to content

Commit

Permalink
Add setter to global.Memory
Browse files Browse the repository at this point in the history
  • Loading branch information
RiftLurker committed Jan 2, 2017
1 parent 1262053 commit 10eddf7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/game/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,16 @@
runCodeCache[userId].memory._parsed = null;
}

this.Memory = runCodeCache[userId].memory._parsed;

return runCodeCache[userId].memory._parsed;
},
set(memory) {
Object.defineProperty(runCodeCache[userId].globals, 'Memory', {
configurable: true,
enumerable: true,
value: runCodeCache[userId].memory._parsed
value: memory
});

return runCodeCache[userId].memory._parsed;
}
});

Expand Down

0 comments on commit 10eddf7

Please sign in to comment.