Skip to content

Commit

Permalink
Fixing Prepack model for latest global.nativeExtensions changes.
Browse files Browse the repository at this point in the history
Differential Revision: D6943293

fbshipit-source-id: cb67b063b77e8f89712fb437fc5471b7f874c482
  • Loading branch information
NTillmann authored and facebook-github-bot committed Feb 9, 2018
1 parent b973fe4 commit 01a58d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Libraries/Image/resolveAssetSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 01a58d1

Please sign in to comment.