Revert "Move allAsyncExtensionsLoaded call from installTargets to _loadExtensions"
The async extensions loading counter is not the most reliable thing,
so let's not break block sharing if something went wrong.
This reverts commit 042f979d59.
This commit is contained in:
1 parent
cd40f38f76
commit
40394f0c43
1 file changed
+3
-5
@@ -645,10 +645,6 @@ class VirtualMachine extends EventEmitter {
|
||||
* @param {Map<string, string>} extensionURLs A map of extension ID to URL
|
||||
*/
|
||||
async _loadExtensions (extensionIDs, extensionURLs = new Map()) {
|
||||
// Wait for any custom extensions that are loading to finish loading.
|
||||
// We won't be able to determine which URLs we still need to load until this happens.
|
||||
await this.extensionManager.allAsyncExtensionsLoaded();
|
||||
|
||||
const extensionPromises = [];
|
||||
for (const extensionID of extensionIDs) {
|
||||
if (this.extensionManager.isExtensionLoaded(extensionID)) {
|
||||
@@ -680,7 +676,9 @@ class VirtualMachine extends EventEmitter {
|
||||
* @param {boolean} wholeProject - set to true if installing a whole project, as opposed to a single sprite.
|
||||
* @returns {Promise} resolved once targets have been installed
|
||||
*/
|
||||
installTargets (targets, extensions, wholeProject) {
|
||||
async installTargets (targets, extensions, wholeProject) {
|
||||
await this.extensionManager.allAsyncExtensionsLoaded();
|
||||
|
||||
targets = targets.filter(target => !!target);
|
||||
|
||||
return this._loadExtensions(extensions.extensionIDs, extensions.extensionURLs).then(() => {
|
||||
|
||||
Reference in new issue
Block a user