serializer.ts
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "serializer.ts", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Proper serialization and deserialization raw json objects to classes in Typescript", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -39,3 +39,3 @@ var MetadataStorage_1 = require("./metadata/MetadataStorage"); | ||
if (object[key] instanceof Array) { | ||
if (!type) | ||
if (object[key].length > 0 && !type) | ||
throw new TypeMissingError_1.TypeMissingError(cls, key); | ||
@@ -42,0 +42,0 @@ newObject[key] = object[key].map(function (arrayItem) { return _this.convert(type, arrayItem, operationType); }); |
Sorry, the diff of this file is not supported yet
32404