Skip to content

Commit f14bdf7

Browse files
committed
fix: don't hard-refresh the page on preview updates
1 parent 4e3dcb4 commit f14bdf7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PrismicPreviewClient.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ export function PrismicPreviewClient(props: PrismicPreviewClientProps): null {
6868
});
6969
}
7070

71-
function onUpdate() {
71+
function onUpdate(event: Event) {
72+
event.preventDefault();
7273
refresh();
7374
}
7475

0 commit comments

Comments
 (0)