Ensure testing descriptor property of Array object
Object.getOwnPropertyDescriptor fails if the value is undefined and the method can return null if there is no such property. So we must ensure that the value is a Group (which means an Array). issue8136 review53561002
This commit is contained in:
1 parent
d5c186f9bf
commit
e430058e28
1 file changed
+4
-1
+4
-1
@@ -1256,9 +1256,12 @@
|
||||
}
|
||||
var field = this.model.fields[name];
|
||||
var value = this._values[name];
|
||||
if (!(value instanceof Array)) {
|
||||
continue;
|
||||
}
|
||||
var context_descriptor = Object.getOwnPropertyDescriptor(
|
||||
value, 'context');
|
||||
if (!value || !context_descriptor.set) {
|
||||
if (!context_descriptor || !context_descriptor.set) {
|
||||
continue;
|
||||
}
|
||||
var context = field.description.context;
|
||||
|
||||
Reference in new issue
Block a user