Permalink
Browse files

Fixing Prepack model for latest global.nativeExtensions changes.

Differential Revision: D6943293

fbshipit-source-id: cb67b063b77e8f89712fb437fc5471b7f874c482
  • Loading branch information...
NTillmann authored and facebook-github-bot committed Feb 9, 2018
1 parent b973fe4 commit 01a58d182abd19c9e089ec38b08ffd4b45e2076c
Showing with 4 additions and 4 deletions.
  1. +4 −4 Libraries/Image/resolveAssetSource.js
@@ -89,12 +89,12 @@ function resolveAssetSource(source: any): ?ResolvedAssetSource {
return resolver.defaultAsset();
}
let sourceCodeScriptURL: ?string = global.nativeExtensions && global.nativeExtensions.SourceCode && global.nativeExtensions.SourceCode.scriptURL;
if (!sourceCodeScriptURL) {
let sourceCode = global.nativeExtensions && global.nativeExtensions.SourceCode;
if (!sourceCode) {
const NativeModules = require('NativeModules');
sourceCodeScriptURL = NativeModules && NativeModules.SourceCode && NativeModules.SourceCode.scriptURL;
sourceCode = NativeModules && NativeModules.SourceCode;
}
_sourceCodeScriptURL = sourceCodeScriptURL;
_sourceCodeScriptURL = sourceCode.scriptURL;
module.exports = resolveAssetSource;
module.exports.pickScale = AssetSourceResolver.pickScale;

0 comments on commit 01a58d1

Please sign in to comment.