Skip to content

Commit 9081e9d

Browse files
committed
Update live-view.js
1 parent 3811553 commit 9081e9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

live-view/live-view.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,14 +620,14 @@ if (isMobile) {
620620
// replace URL in window address bar
621621
liveViewWindow.addEventListener('DOMContentLoaded', () => {
622622

623-
liveViewWindow.window.history.pushState({}, 'Codeit', window.location.origin + '/full/run');
623+
liveViewWindow.window.history.pushState({url: liveViewURL}, 'Codeit', window.location.origin + '/full/run');
624624

625625
});
626626

627627
liveViewWindow.addEventListener('beforeunload', () => {
628628

629-
liveViewWindow.window.location.href = liveViewURL;
630-
629+
liveViewWindow.window.location.href = liveViewWindow.window.history.state.url;
630+
631631
});
632632

633633

0 commit comments

Comments
 (0)