File tree 2 files changed +4
-3
lines changed
packages/react-devtools-shared/src
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -181,8 +181,9 @@ export function formatWithStyles(
181
181
inputArgs === undefined ||
182
182
inputArgs === null ||
183
183
inputArgs . length === 0 ||
184
+ typeof inputArgs [ 0 ] !== 'string' ||
184
185
// Matches any of %c but not %%c
185
- ( typeof inputArgs [ 0 ] === 'string' && inputArgs [ 0 ] . match ( / ( [ ^ % ] | ^ ) ( % c ) / g) ) ||
186
+ inputArgs [ 0 ] . match ( / ( [ ^ % ] | ^ ) ( % c ) / g) ||
186
187
style === undefined
187
188
) {
188
189
return inputArgs ;
Original file line number Diff line number Diff line change @@ -180,9 +180,9 @@ export function installHook(target: any): DevToolsHook | null {
180
180
inputArgs === undefined ||
181
181
inputArgs === null ||
182
182
inputArgs . length === 0 ||
183
+ typeof inputArgs [ 0 ] !== 'string' ||
183
184
// Matches any of %c but not %%c
184
- ( typeof inputArgs [ 0 ] === 'string' &&
185
- inputArgs [ 0 ] . match ( / ( [ ^ % ] | ^ ) ( % c ) / g) ) ||
185
+ inputArgs [ 0 ] . match ( / ( [ ^ % ] | ^ ) ( % c ) / g) ||
186
186
style === undefined
187
187
) {
188
188
return inputArgs ;
You can’t perform that action at this time.
0 commit comments