Skip to content

Commit

Permalink
fix egoist#58
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacek Pietal committed Jul 14, 2019
1 parent fe80500 commit 713b6d6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/utils/proxy-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,15 @@
const replacements = args[0].match(/(%[sc])([^%]*)/gm)
const texts = []
const styles = []
for (let i = 1; i < args.length; i++) {
for (let i = 1; Array.isArray(replacements) && i < args.length; i++) {
switch (replacements.shift().substr(0, 2)) {
case '%s':
texts.push(args[i])
break
case '%c':
styles.push(args[i])
break
default:
case '%s':
texts.push(args[i])
break
case '%c':
styles.push(args[i])
break
default:
}
}

Expand Down

0 comments on commit 713b6d6

Please sign in to comment.