Use promises in 'SourceCodeModule'

Summary: Closes https://github.com/facebook/react-native/pull/5504

Reviewed By: svcscm

Differential Revision: D2861158

Pulled By: dmmiller

fb-gh-sync-id: 3e9c257288539183f6156b8d360b54dc570bc7ad
This commit is contained in:
Satyajit Sahoo
2016-01-25 12:34:06 -08:00
committed by facebook-github-bot-9
parent ea1aec3c23
commit 0007bff977
3 changed files with 11 additions and 9 deletions

View File

@@ -39,7 +39,7 @@ function fetchSourceMap(): Promise {
return Promise.reject(new Error('RCTNetworking module is not available'));
}
return new Promise(RCTSourceCode.getScriptText)
return RCTSourceCode.getScriptText()
.then(extractSourceMapURL)
.then((url) => {
if (url === null) {