mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Merge github.com:msand/paper.js into msand-master
This commit is contained in:
commit
f224bb3e86
2 changed files with 3 additions and 3 deletions
|
@ -219,7 +219,7 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
|
|||
function handleAttribute(name) {
|
||||
name += 'Attribute';
|
||||
return function(el, attr) {
|
||||
return el[name](attr) || el[name]('data-paper-' + attr);
|
||||
return el[name] && (el[name](attr) || el[name]('data-paper-' + attr));
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
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