forked from DigiLive/mushroom-strategy
Fix views not loading when using card_options (#118)
The logic to check whether an entity is hidden has been changed. Instead of checking the `entity_id` field which is always undefined, the updated logic now dynamically references the `entity.entity_id` within the card options of the strategy options. --------- Co-authored-by: Ferry Cools <fcools@digilive.nl>
This commit is contained in:
@@ -149,7 +149,7 @@ abstract class AbstractView {
|
|||||||
entity =>
|
entity =>
|
||||||
entity.entity_id.startsWith(domain + ".")
|
entity.entity_id.startsWith(domain + ".")
|
||||||
&& !entity.hidden_by
|
&& !entity.hidden_by
|
||||||
&& !Helper.strategyOptions.card_options?.entity_id.hidden
|
&& !Helper.strategyOptions.card_options?.[entity.entity_id]?.hidden
|
||||||
).map(entity => entity.entity_id),
|
).map(entity => entity.entity_id),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user