Fix issue with JSON import.

This commit is contained in:
Jürg Lehni 2013-11-29 12:18:55 +01:00
parent c08fd44101
commit 5f7dbfb1ab

View file

@ -445,7 +445,7 @@ Base.inject(/** @lends Base# */{
function(type, args) {
// If a target is provided and its of the right type,
// import right into it.
var obj = target.constructor === type
var obj = target && target.constructor === type
? target
: Base.create(type.prototype),
isTarget = obj === target;