From 6be9ad5e3520c555de859cd6b20fe278235073c3 Mon Sep 17 00:00:00 2001 From: blagoev Date: Fri, 12 May 2017 00:04:19 +0300 Subject: [PATCH] Add a fix for RN hang with promises --- lib/extensions.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index 1bd0a0c7..2ab8a789 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -50,7 +50,7 @@ module.exports = function(realmConstructor) { } let syncedRealm = new realmConstructor(config); - resolve(syncedRealm); + setTimeout(_ => { resolve(syncedRealm); }, 1); //FIXME: RN hangs here. Remove when node's makeCallback alternative is implemented }); }); }, @@ -64,7 +64,6 @@ module.exports = function(realmConstructor) { let syncedRealm = new realmConstructor(config); callback(null, syncedRealm); }); - }, }));