From 061b0b081f555cbe5c4990eda98568d9c80d9bd1 Mon Sep 17 00:00:00 2001 From: Karishma Chadha Date: Mon, 25 Mar 2019 16:39:00 -0400 Subject: [PATCH] Refactor loadExtensionURL for readability. --- src/extension-support/extension-manager.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extension-support/extension-manager.js b/src/extension-support/extension-manager.js index 3b8f25a69..5ffefa1b7 100644 --- a/src/extension-support/extension-manager.js +++ b/src/extension-support/extension-manager.js @@ -149,9 +149,9 @@ class ExtensionManager { const extension = builtinExtensions[extensionURL](); const extensionInstance = new extension(this.runtime); - return Promise.resolve(this._registerInternalExtension(extensionInstance)).then(serviceName => { - this._loadedExtensions.set(extensionURL, serviceName); - }); + const serviceName = this._registerInternalExtension(extensionInstance); + this._loadedExtensions.set(extensionURL, serviceName); + return Promise.resolve(); } return new Promise((resolve, reject) => {