Skip to content

Commit 2c49c65

Browse files
committed
fixup: use custom attribute
1 parent 3a3e20a commit 2c49c65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

template/src/layouts/Layout.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ const { title } = Astro.props;
4444
}
4545

4646
// only swap the main area of the page so we keep the webcontainer iframe intact
47-
const newMain = newDocument.querySelector('main');
48-
const oldMain = document.querySelector('main');
47+
const newMain = newDocument.querySelector('main[data-swap-root]');
48+
const oldMain = document.querySelector('main[data-swap-root]');
4949

5050
if (newMain && oldMain) {
5151
builtInSwap.swapBodyElement(newMain, oldMain);

0 commit comments

Comments
 (0)