mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
make more-info- tags in dynamicContentUpdater lowercase (#211)
When trying to understand the source tree using `git grep` the fact that the critical function which actually creates the more-info- panels used MORE-INFO, makes it actually hard to find. Rework the logic so that it's all managed in lower case for greater discoverability of hunting through code. Because the stateMoreInfoType comes from home-assistant domains, this should always be lower case, so no explicit lower casing is needed.
This commit is contained in:
parent
14ea3e3af4
commit
a87c431428
@ -45,7 +45,7 @@ Polymer({
|
||||
}
|
||||
} else {
|
||||
window.hassUtil.dynamicContentUpdater(
|
||||
this, 'MORE-INFO-' + window.hassUtil.stateMoreInfoType(stateObj).toUpperCase(),
|
||||
this, 'more-info-' + window.hassUtil.stateMoreInfoType(stateObj),
|
||||
{ hass: this.hass, stateObj: stateObj, isVisible: true });
|
||||
}
|
||||
},
|
||||
|
@ -76,7 +76,7 @@ window.hassUtil.dynamicContentUpdater = function (root, newElementTag, attribute
|
||||
var rootEl = Polymer.dom(root);
|
||||
var customEl;
|
||||
|
||||
if (rootEl.lastChild && rootEl.lastChild.tagName === newElementTag) {
|
||||
if (rootEl.lastChild && rootEl.lastChild.tagName.toLowerCase() === newElementTag) {
|
||||
customEl = rootEl.lastChild;
|
||||
} else {
|
||||
if (rootEl.lastChild) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user