mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-03 08:43:50 -04:00
Prevent overriding exported classes by inheriting classes with same _class value.
This commit is contained in:
parent
d8188e8ddc
commit
75c1225d4f
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ Base.inject(/** @lends Base# */{
|
||||||
// for deserialization and injection into PaperScope.
|
// for deserialization and injection into PaperScope.
|
||||||
var res = extend.base.apply(this, arguments),
|
var res = extend.base.apply(this, arguments),
|
||||||
name = res.prototype._class;
|
name = res.prototype._class;
|
||||||
if (name)
|
if (name && !Base.exports[name])
|
||||||
Base.exports[name] = res;
|
Base.exports[name] = res;
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue