1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Secured logging color picking

This commit is contained in:
kkapsner 2017-12-18 23:57:25 +01:00
parent 04d3777e6f
commit 18ceb998e0

View File

@ -59,10 +59,10 @@
"]";
if (typeof args[0] === "string"){
args[0] = pre + " " + args[0];
args.splice(1, 0, colors[level]);
args.splice(1, 0, colors[level] || "");
}
else {
args.unshift(colors[level]);
args.unshift(colors[level] || "");
args.unshift(pre);
}
console.log.apply(console, args);