Test if views attribute is empty using jQuery.isEmptyObject
The views attribute can be just an empty object when the xxx2Many field is using a different widget like a multiselection. Closes #13917
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
'use strict';
|
||||
|
||||
function get_x2m_sub_fields(f_attrs, prefix) {
|
||||
if (f_attrs.visible && f_attrs.views) {
|
||||
if (f_attrs.visible && !jQuery.isEmptyObject(f_attrs.views)) {
|
||||
// There's only one key but we don't know its value
|
||||
const [[, view],] = Object.entries(f_attrs.views);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user