Merge pull request #1436 from michelalbers/master

Fix for missing Realm constructor in js debugging mode
This commit is contained in:
blagoev 2017-10-31 11:14:57 +02:00 committed by GitHub
commit 576d22d274
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,12 @@ function getContext() {
return 'chromedebugger'; return 'chromedebugger';
} }
// Check if its in remote js debugging mode
// https://stackoverflow.com/a/42839384/3090989
if (typeof atob !== 'undefined') {
return 'chromedebugger';
}
// Otherwise, we must be in a "normal" react native situation. // Otherwise, we must be in a "normal" react native situation.
// In that case, the Realm type should have been injected by the native code. // In that case, the Realm type should have been injected by the native code.
// If it hasn't, the user likely forgot to run link. // If it hasn't, the user likely forgot to run link.