mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Require assets inside a try/catch
This commit is contained in:
parent
5d5129d753
commit
e67743a4ba
1 changed files with 11 additions and 1 deletions
|
@ -4,7 +4,17 @@ const Clone = require('../../util/clone');
|
||||||
const Cast = require('../../util/cast');
|
const Cast = require('../../util/cast');
|
||||||
const MathUtil = require('../../util/math-util');
|
const MathUtil = require('../../util/math-util');
|
||||||
const Timer = require('../../util/timer');
|
const Timer = require('../../util/timer');
|
||||||
const assetData = require('./manifest');
|
|
||||||
|
/**
|
||||||
|
* The instrument and drum sounds, loaded as static assets.
|
||||||
|
* @type {object}
|
||||||
|
*/
|
||||||
|
let assetData = {};
|
||||||
|
try {
|
||||||
|
assetData = require('./manifest');
|
||||||
|
} catch (e) {
|
||||||
|
// Non-webpack environment, don't worry about assets.
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Icon svg to be displayed at the left edge of each extension block, encoded as a data URI.
|
* Icon svg to be displayed at the left edge of each extension block, encoded as a data URI.
|
||||||
|
|
Loading…
Reference in a new issue