diff options
author | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-27 00:04:11 -0500 |
---|---|---|
committer | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-27 14:57:57 -0500 |
commit | de7d95b13af448ad2c7547060de8ce08fcedd3e4 (patch) | |
tree | 7bb83e871559db81cd08b8e248bca7173cafe248 | |
parent | ba62050f97564e49d8e4091a0b3360bbbd8650a2 (diff) |
fixed space.print() modifying internal data
-rw-r--r-- | space.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -64,7 +64,7 @@ function Space(){ }; this.print = function(){ - return this.data.map(row => replace(replace(replace(row,'&','\\&'),'\\','\\\\'),'','&').join('')).join('\n'); + return this.data.map(row => replace(replace(replace(row.slice(),'&','\\&'),'\\','\\\\'),'','&').join('')).join('\n'); } this.fromfile = function(filename){ //Reads an external file into internal data |