From fb29a95e011921ac043993a852223a27d1224464 Mon Sep 17 00:00:00 2001 From: Adam Miskiewicz Date: Tue, 2 Feb 2016 09:24:30 -0800 Subject: [PATCH] Fix import of LinkingIOS on Android Summary: We need to check the existence of RCTLinkingManager (which doesn't exist on Android) because this code is called on require. Closes https://github.com/facebook/react-native/pull/5680 Reviewed By: svcscm Differential Revision: D2887260 Pulled By: androidtrunkagent fb-gh-sync-id: 4a5843ea6a5898d0f2810ad9ddb5b2078054e9f1 --- Libraries/LinkingIOS/LinkingIOS.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LinkingIOS/LinkingIOS.js b/Libraries/LinkingIOS/LinkingIOS.js index d223b0d8b..aa252c7d6 100644 --- a/Libraries/LinkingIOS/LinkingIOS.js +++ b/Libraries/LinkingIOS/LinkingIOS.js @@ -15,7 +15,7 @@ var Linking = require('Linking'); var RCTLinkingManager = require('NativeModules').LinkingManager; var invariant = require('invariant'); -var _initialURL = RCTLinkingManager.initialURL; +var _initialURL = RCTLinkingManager && RCTLinkingManager.initialURL; /** * NOTE: `LinkingIOS` is being deprecated. Use `Linking` instead.