Skip to content
Snippets Groups Projects
Unverified Commit 167a005b authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Don't send back "undefined" if the attribute wasn't found

parent 85841987
No related branches found
No related tags found
No related merge requests found
Pipeline #52233 passed
...@@ -193,6 +193,13 @@ export class AdapterLitElement extends LitElement { ...@@ -193,6 +193,13 @@ export class AdapterLitElement extends LitElement {
detail: { detail: {
name: global, name: global,
callback: (value) => { callback: (value) => {
// Don't send back "undefined" if the attribute wasn't found (for example if the providerRoot
// is used and the attribute was subscribed but not set anywhere), because that will be
// interpreted as "true" for Boolean lit-element attributes!
if (value === undefined) {
return;
}
Logger.debug('AdapterLitElement(' + that.tagName + ') sub/Callback ' + global + ' -> ' + local + ' = ' + value); Logger.debug('AdapterLitElement(' + that.tagName + ') sub/Callback ' + global + ' -> ' + local + ' = ' + value);
// If value is an object set it directly as property // If value is an object set it directly as property
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment