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

Only add entry-point-url and lang attributes if they aren't subscribed (dbp/apps/library#77)

parent e660d2a3
No related branches found
No related tags found
No related merge requests found
Pipeline #15627 passed
......@@ -726,14 +726,22 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) {
return html``;
const elm = this._createActivityElement(act);
elm.setAttribute("entry-point-url", this.entryPointUrl);
elm.setAttribute("lang", this.lang);
// add subscriptions to the provider component
// add subscriptions for the provider component
if (act.subscribe !== undefined) {
elm.setAttribute("subscribe", act.subscribe);
}
// only add the entry-point-url attribute if it isn't subscribed
if (act.subscribe === undefined || !act.subscribe.includes("entry-point-url:")) {
elm.setAttribute("entry-point-url", this.entryPointUrl);
}
// only add the lang attribute if it isn't subscribed
if (act.subscribe === undefined || !act.subscribe.includes("lang:")) {
elm.setAttribute("lang", this.lang);
}
return elm;
}
......
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