Skip to content

Commit

Permalink
Allow following fech requests
Browse files Browse the repository at this point in the history
  • Loading branch information
timonson committed Oct 20, 2023
1 parent 67a1c48 commit d11c8f7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions shadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,8 @@ export class Shadow extends HTMLElement {
* @returns {void}
*/
attributeChangedCallback(name, oldValue, newValue) {
if (newValue === oldValue) {
return undefined;
} else if (
// This condition must be first to allow following fetch requests.
if (
(name === "json-url" || name === "html-url" || name === "init-url") &&
isString(newValue)
) {
Expand All @@ -394,6 +393,8 @@ export class Shadow extends HTMLElement {
this._actuallyRender();
}
});
} else if (newValue === oldValue) {
return undefined;
} else {
return this._updateFromAttribute(name, newValue);
}
Expand Down

0 comments on commit d11c8f7

Please sign in to comment.