Use Set.has instead of undefined indexOf on Field.views
The views attribute is a Set and not a list. issue11134
This commit is contained in:
1 parent
6670cb0cc7
commit
688a10ff0d
1 file changed
+1
-1
+1
-1
@@ -316,7 +316,7 @@ function eval_pyson(value){
|
||||
var field_names = new Set(this.get_fields());
|
||||
for (name in record.model.fields) {
|
||||
field = record.model.fields[name];
|
||||
if (~field.views.indexOf(this.view_id)) {
|
||||
if (~field.views.has(this.view_id)) {
|
||||
field_names.add(name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user