Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
timonson committed Aug 21, 2023
1 parent 92facba commit 0a7a100
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions shadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ export class Shadow extends HTMLElement {
* @returns {Promise<void>}
*/
async _makeRpcCallAndRender(method, property) {
const urlOrPath =
isString(this.getAttribute("dev-url")) && this._isDevelopment
? this.getAttribute("dev-url")
: this.getAttribute("rpc-url");
const devUrlOrNull = this.getAttribute("dev-url");
const urlOrPath = isString(devUrlOrNull) && this._isDevelopment
? devUrlOrNull
: this.getAttribute("rpc-url");
if (isString(urlOrPath)) {
const [url, jwt] = this._getUrlAndJwt(urlOrPath);
try {
Expand Down Expand Up @@ -379,8 +379,9 @@ export class Shadow extends HTMLElement {
(name === "json-url" || name === "html-url" || name === "init-url") &&
isString(newValue)
) {
if (isString(this.getAttribute("dev-url")) && this._isDevelopment) {
newValue = this.getAttribute("dev-url");
const devUrlOrNull = this.getAttribute("dev-url");
if (isString(devUrlOrNull) && this._isDevelopment) {
newValue = devUrlOrNull;
}
this._isPaused = true;
this._updateFromAttribute(name, newValue);
Expand Down

0 comments on commit 0a7a100

Please sign in to comment.