Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into replace-babel-wit…
Browse files Browse the repository at this point in the history
…h-browserify
  • Loading branch information
AccaliaDeElementia committed Dec 21, 2016
2 parents f484cfe + f098331 commit f512cf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function useColors() {
// NB: In an Electron preload script, document will be defined but not fully
// initialized. Since we know we're in Chrome, we'll just detect this case
// explicitly
if (typeof window !== 'undefined' && 'process' in window && window.process.type === 'renderer') {
if (typeof window !== 'undefined' && typeof window.process !== 'undefined' && window.process.type === 'renderer') {
return true;
}

Expand Down Expand Up @@ -95,7 +95,7 @@ function formatArgs(args) {
// figure out the correct index to insert the CSS into
var index = 0;
var lastC = 0;
args[0].replace(/%[a-z%]/g, function(match) {
args[0].replace(/%[a-zA-Z%]/g, function(match) {
if ('%%' === match) return;
index++;
if ('%c' === match) {
Expand Down

0 comments on commit f512cf2

Please sign in to comment.