From b8da6a29636d152f23f9e4c3b9e476d18b8fdfab Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Thu, 7 Apr 2016 08:25:54 -0700 Subject: [PATCH] Wait for the modules directory to be created before writing module files Summary: Typo: the operation of writing module files to a common sub-directory didn?t wait until that directory was created, because `Promise.all` was invoked directly as argument to `.then()`, rather than putting it in a lambda function. Reviewed By: andreicoman11 Differential Revision: D3150338 fb-gh-sync-id: c65270b1757a248993048b039f5ebadb281b2eea fbshipit-source-id: c65270b1757a248993048b039f5ebadb281b2eea --- local-cli/bundle/output/unbundle/as-assets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local-cli/bundle/output/unbundle/as-assets.js b/local-cli/bundle/output/unbundle/as-assets.js index 4165907c0..2f818b0d7 100644 --- a/local-cli/bundle/output/unbundle/as-assets.js +++ b/local-cli/bundle/output/unbundle/as-assets.js @@ -41,7 +41,7 @@ function saveAsAssets(bundle, options, log) { const modulesDir = path.join(path.dirname(bundleOutput), MODULES_DIR); const writeUnbundle = createDir(modulesDir).then( // create the modules directory first - Promise.all([ + () => Promise.all([ writeModules(modules, modulesDir, encoding), writeFile(bundleOutput, startupCode, encoding), writeMagicFlagFile(modulesDir),