toObject fixes

This commit is contained in:
Anton Lavrenov
2018-07-05 14:49:02 +07:00
parent b18b11bc5f
commit e6c5325ccb
5 changed files with 21 additions and 5 deletions

View File

@@ -1231,7 +1231,7 @@
for (key in attrs) {
val = attrs[key];
getter = this[key];
getter = typeof this[key] === 'function' && this[key];
// remove attr value so that we can extract the default value from the getter
delete attrs[key];
defaultValue = getter ? getter.call(this) : null;