mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Fix async loading of PaperScript to use correct scope.
This commit is contained in:
parent
f7a473a598
commit
900cea3123
1 changed files with 3 additions and 3 deletions
|
@ -315,9 +315,9 @@ paper.PaperScope.prototype.PaperScript = (function(root) {
|
|||
if (src) {
|
||||
// If we're loading from a source, request that first and
|
||||
// then run later.
|
||||
paper.Http.request('get', src, function(code) {
|
||||
evaluate(code, scope);
|
||||
});
|
||||
paper.Http.request('get', src, function(scope, code) {
|
||||
evaluate(code, scope);
|
||||
}.bind(this, scope));
|
||||
} else {
|
||||
// We can simply get the code form the script tag.
|
||||
evaluate(script.innerHTML, scope);
|
||||
|
|
Loading…
Reference in a new issue