Ensure grid options always return an object (#25760)

This commit is contained in:
Paul Bottein 2025-06-12 09:44:20 +02:00
parent 8cead75087
commit 38545a01dd
No known key found for this signature in database

View File

@ -96,7 +96,9 @@ export class HuiCard extends ReactiveElement {
if (!this._element) return {};
if (this._element.getGridOptions) {
return this._element.getGridOptions();
const options = this._element.getGridOptions();
// Some custom cards might return undefined, so we ensure we return an object
return options || {};
}
if (this._element.getLayoutOptions) {
// Disabled for now to avoid spamming the console, need to be re-enabled when hui-card performance are fixed