Skip to content

Commit 8fb1b61

Browse files
authored
fix(Toast): remove type from view transitions (#9088)
1 parent 070dfd6 commit 8fb1b61

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/@react-spectrum/s2/src/Toast.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ function startViewTransition(fn: () => void, type: string) {
6868
if ('startViewTransition' in document) {
6969
// Safari doesn't support :active-view-transition-type() yet, so we fall back to a class on the html element.
7070
document.documentElement.classList.add(toastCss[type]);
71-
let viewTransition = document.startViewTransition({
72-
update: () => flushSync(fn),
73-
types: [toastCss[type]]
74-
});
71+
let viewTransition = document.startViewTransition(() => flushSync(fn));
7572

7673
viewTransition.ready.catch(() => {});
7774
viewTransition.finished.then(() => {

0 commit comments

Comments
 (0)