mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
PaperScript: Give global.acorn the preference over the bundled one.
So people can load their own preferred version in sketch.paperjs.org Relates to #1183
This commit is contained in:
parent
29e7aba587
commit
0ec06e7353
1 changed files with 4 additions and 2 deletions
|
@ -37,8 +37,10 @@ Base.exports.PaperScript = function() {
|
|||
|
||||
function parse(code, options) {
|
||||
// NOTE: When using load.js, Acorn will end up in global.acorn and will
|
||||
// not be immediately available, so we need to check for it here again:
|
||||
return (acorn || global.acorn).parse(code, options);
|
||||
// not be immediately available, so we need to check for it here again.
|
||||
// We also give global.acorn the preference over the bundled one, so
|
||||
// people can load their own preferred version in sketch.paperjs.org
|
||||
return (global.acorn || acorn).parse(code, options);
|
||||
}
|
||||
|
||||
// Operators to overload
|
||||
|
|
Loading…
Reference in a new issue