Prevent overriding exported classes by inheriting classes with same _class value.

This commit is contained in:
Jürg Lehni 2013-06-24 04:22:43 -07:00
parent d8188e8ddc
commit 75c1225d4f

View file

@ -88,7 +88,7 @@ Base.inject(/** @lends Base# */{
// for deserialization and injection into PaperScope.
var res = extend.base.apply(this, arguments),
name = res.prototype._class;
if (name)
if (name && !Base.exports[name])
Base.exports[name] = res;
return res;
},