Skip to content

Commit 7c119ba

Browse files
HeyImChrisacoates-ms
authored andcommitted
Console.assert doesn't exist in the simulator, so this will always re… (#184)
* console.assert doesn't exist in the simulator, so this will always redbox unless the debugger is attached (in which case it runs through chrome which has all the console methods already defined) * a more proper fix is to check that console has the assert property
1 parent 4e1e541 commit 7c119ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/polyfills/console.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ if (global.nativeLoggingHook) {
560560
// TODO(T43930203): remove this special case once originalConsole.assert properly checks
561561
// the condition
562562
if (methodName === 'assert') {
563-
if (!arguments[0]) {
563+
if (!arguments[0] && originalConsole.hasOwnProperty('assert')) {
564564
originalConsole.assert(...arguments);
565565
}
566566
} else {

0 commit comments

Comments
 (0)