Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklin committed Nov 6, 2023
1 parent 52661a0 commit 8e33185
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/layouts/Navbar/components/ThemeChange/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ const mode = useColorMode<CustomTheme>({
function changeTheme(event: MouseEvent, theme: CustomTheme) {
const isSameTheme = mode.value === theme;
try {
// eslint-disable-next-line ts/ban-ts-comment
// @ts-expect-error
if (document.startViewTransition === undefined) {
throw new Error("document.startViewTransition is undefined, please update your browser to the latest version or use a modern browser.");
}
Expand All @@ -53,6 +55,8 @@ function changeTheme(event: MouseEvent, theme: CustomTheme) {
Math.max(x, innerWidth - x),
Math.max(y, innerHeight - y),
);
// eslint-disable-next-line ts/ban-ts-comment
// @ts-expect-error
const transition = document.startViewTransition();
transition.ready.then(() => {
const clipPath = [
Expand Down

0 comments on commit 8e33185

Please sign in to comment.