ts-json-serializer
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -7,2 +7,6 @@ # Change Log | ||
## [1.2.2] | ||
#### Fixed | ||
- Undefined objects in array caused error | ||
## [1.2.1] | ||
@@ -36,3 +40,4 @@ #### Fixed | ||
[Unreleased]: https://github.com/buehler/ts-json-serializer/compare/v1.2.1...master | ||
[Unreleased]: https://github.com/buehler/typescript-hero/compare/v1.2.2...master | ||
[1.2.2]: https://github.com/buehler/typescript-hero/compare/v1.2.1...v1.2.2 | ||
[1.2.1]: https://github.com/buehler/ts-json-serializer/compare/v1.2.0...v1.2.1 | ||
@@ -39,0 +44,0 @@ [1.2.0]: https://github.com/buehler/ts-json-serializer/compare/v1.1.0...v1.2.0 |
{ | ||
"name": "ts-json-serializer", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Object serialization made easy with decorators.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -60,3 +60,3 @@ "use strict"; | ||
if (objectOrArray !== null && objectOrArray.constructor === Array) { | ||
serialized = objectOrArray.filter(function (o) { return o !== undefined; }).map(function (o) { return _this.serializeObject(o); }); | ||
serialized = objectOrArray.map(function (o) { return _this.serializeObject(o); }).filter(function (o) { return o !== undefined; }); | ||
} | ||
@@ -107,3 +107,6 @@ else { | ||
var _this = this; | ||
if (obj === null) { | ||
if (obj === undefined || (obj && !obj.constructor)) { | ||
return; | ||
} | ||
else if (obj === null) { | ||
return { | ||
@@ -110,0 +113,0 @@ __type: 'null', |
90923
771