From d520d347f2bca4853c2fe3620a5b1481824e3145 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 16:24:13 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- packages/nuxt/src/app/utils.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/nuxt/src/app/utils.ts b/packages/nuxt/src/app/utils.ts index 497542451f..9a9b884f3c 100644 --- a/packages/nuxt/src/app/utils.ts +++ b/packages/nuxt/src/app/utils.ts @@ -1,6 +1,5 @@ import { useNuxtApp } from './nuxt' - export function toArray (value: T | T[]): T[] { return Array.isArray(value) ? value : [value] } @@ -9,7 +8,7 @@ export type CallbackFn = () => void export type ObserveFn = (element: Element, callback: CallbackFn) => () => void export function useIntersectionObserver (options?: IntersectionObserverInit): { observe: ObserveFn } { - if (import.meta.server) { return {observe: () => () => {}} } + if (import.meta.server) { return { observe: () => () => {} } } const nuxtApp = useNuxtApp() if (nuxtApp._observer) { @@ -28,7 +27,7 @@ export function useIntersectionObserver (options?: IntersectionObserverInit): { const isVisible = entry.isIntersecting || entry.intersectionRatio > 0 if (isVisible && callback) { callback() } } - },options) + }, options) } callbacks.set(element, callback) observer.observe(element) @@ -47,4 +46,4 @@ export function useIntersectionObserver (options?: IntersectionObserverInit): { } return _observer -} \ No newline at end of file +}