Skip to content

Commit

Permalink
logs should be copied as a new array
Browse files Browse the repository at this point in the history
  • Loading branch information
Maizify committed Sep 20, 2017
1 parent ba19b4f commit 7d85eaa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/log/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ class VConsoleLogTab extends VConsolePlugin {
return;
}

// copy logs as a new array
logs = [].slice.call(logs || []);

// check `[default]` format
let shouldBeHere = true;
let pattern = /^\[(\w+)\] ?/i;
Expand All @@ -261,6 +264,7 @@ class VConsoleLogTab extends VConsolePlugin {
targetTabName = match[1].toLowerCase();
}
}
// this.printOriginLog({logType:'info', logs:['!!!', targetTabName, this.id, '['+logs.join(' ')+']']});
if (targetTabName) {
shouldBeHere = (targetTabName == this.id);
} else if (this.allowUnformattedLog == false) {
Expand Down

0 comments on commit 7d85eaa

Please sign in to comment.