Prevent overriding of global variables with undefined values during development.

This commit is contained in:
Jürg Lehni 2014-01-05 18:57:36 +01:00
parent 73f857170d
commit 132f6df6c8

View file

@ -160,7 +160,7 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
// fields on PaperScope.prototype, e.g. all classes
for (var key in this)
// Exclude all 'hidden' fields
if (!/^_/.test(key))
if (!/^_/.test(key) && this[key])
scope[key] = this[key];
},