browser: reset the "content" color via color: inherit

Necessary for Firefox v31, which seems to retain the previous
color from a previous %c color formatter when an empty string
is given.
This commit is contained in:
Nathan Rajlich 2014-07-15 15:41:03 -07:00
parent 165e937e6d
commit 998d85bac9

View File

@ -72,7 +72,7 @@ function formatArgs() {
if (!useColors) return args;
var c = 'color: ' + this.color;
args = [args[0], c, ''].concat(Array.prototype.slice.call(args, 1));
args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
// the final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to