Skip to content

Commit

Permalink
update replaceWorld.js
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshikiohshima committed Aug 4, 2023
1 parent c4f7e21 commit 52c742e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion behaviors/default/replaceWorld.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ class ReplaceWorldPawn {
canvas.style.transition = "opacity 1s";
canvas.style.opacity = 0;
const targetURL = this.resolveTargetURL();
setTimeout(() => Microverse.sendToShell("world-replace", { targetURL}), 1000);
setTimeout(() => {
if (window.microverseEnablePortal) {
Microverse.sendToShell("world-replace", { targetURL});
} else {
window.location.replace(targetURL);
}
}, 1000);
}

resolveTargetURL() {
Expand Down

0 comments on commit 52c742e

Please sign in to comment.