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 b61e5db commit 92facba
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions shadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,10 @@ export class Shadow extends HTMLElement {
* @returns {Promise<void>}
*/
async _makeRpcCallAndRender(method, property) {
const urlOrPath = this.getAttribute("dev-url") && this._isDevelopment
? this.getAttribute("dev-url")
: this.getAttribute("rpc-url");
const urlOrPath =
isString(this.getAttribute("dev-url")) && this._isDevelopment
? this.getAttribute("dev-url")
: this.getAttribute("rpc-url");
if (isString(urlOrPath)) {
const [url, jwt] = this._getUrlAndJwt(urlOrPath);
try {
Expand Down Expand Up @@ -378,7 +379,7 @@ export class Shadow extends HTMLElement {
(name === "json-url" || name === "html-url" || name === "init-url") &&
isString(newValue)
) {
if (this.getAttribute("dev-url") && this._isDevelopment) {
if (isString(this.getAttribute("dev-url")) && this._isDevelopment) {
newValue = this.getAttribute("dev-url");
}
this._isPaused = true;
Expand Down

0 comments on commit 92facba

Please sign in to comment.