mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-30 08:10:27 -04:00
Merge 025c2d7b8a
into bb9ac40252
This commit is contained in:
commit
f19352f471
1 changed files with 6 additions and 0 deletions
|
@ -4,6 +4,8 @@ const maybeFormatMessage = require('../util/maybe-format-message');
|
||||||
|
|
||||||
const BlockType = require('./block-type');
|
const BlockType = require('./block-type');
|
||||||
|
|
||||||
|
let rejectUnofficialExtensions = true;
|
||||||
|
|
||||||
// These extensions are currently built into the VM repository but should not be loaded at startup.
|
// These extensions are currently built into the VM repository but should not be loaded at startup.
|
||||||
// TODO: move these out into a separate repository?
|
// TODO: move these out into a separate repository?
|
||||||
// TODO: change extension spec so that library info, including extension ID, can be collected through static methods
|
// TODO: change extension spec so that library info, including extension ID, can be collected through static methods
|
||||||
|
@ -154,6 +156,10 @@ class ExtensionManager {
|
||||||
this._loadedExtensions.set(extensionURL, serviceName);
|
this._loadedExtensions.set(extensionURL, serviceName);
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rejectUnofficialExtensions) {
|
||||||
|
return Promise.reject(new Error('Unofficial extensions not supported here'));
|
||||||
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// If we `require` this at the global level it breaks non-webpack targets, including tests
|
// If we `require` this at the global level it breaks non-webpack targets, including tests
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue