fix array serialization. fix #576

This commit is contained in:
Anton Lavrenov
2019-02-11 08:46:34 -05:00
parent 12fbe870bd
commit 128b5b403e
6 changed files with 94 additions and 9 deletions

View File

@@ -1308,8 +1308,9 @@ export abstract class Node {
for (key in attrs) {
val = attrs[key];
// if value is object and object is not plain
// like class instance, we should skip it and to not inclide
nonPlainObject = Util.isObject(val) && !Util._isPlainObject(val);
// like class instance, we should skip it and to not include
nonPlainObject =
Util.isObject(val) && !Util._isPlainObject(val) && !Util._isArray(val);
if (nonPlainObject) {
continue;
}