-
Type: Bug
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 3.0.10
-
Fix Version/s: None
-
Component/s: UI
-
Tags:
-
Browser:
The <nuxeo-group-tag> doesn't like a null value.
Layout:
<nuxeo-group-tag group="[[document.properties.my:group]]"></nuxeo-group-tag>
If the my:group property is null, the following error is output to the browser console:
main.bundle.js:12648 Uncaught TypeError: Cannot read properties of null (reading 'label') at e._label (954.bundle.js:4029:482) at V (main.bundle.js:12648:74402) at Function._evaluateBinding (main.bundle.js:12648:88771) at Object.Y [as fn] (main.bundle.js:12648:72641) at M (main.bundle.js:12648:69847) at r (main.bundle.js:12648:81749) at l._runEffectsForTemplate (main.bundle.js:12648:81904) at l._propagatePropertyChanges (main.bundle.js:12648:81651) at l._propertiesChanged (main.bundle.js:12648:81181) at l._flushProperties (main.bundle.js:12648:62594)
Workaround: Define a helper function that returns an empty string if null e.g.
<nuxeo-group-tag group="[[_getGroup(document, 'my:group')]]"></nuxeo-group-tag> ... _getGroup(doc, xpath) { return doc && doc.properties && doc.properties[xpath] || ""; },