diff --git a/src/lib/useVisitorData.ts b/src/lib/useVisitorData.ts index f37b550..519dddb 100644 --- a/src/lib/useVisitorData.ts +++ b/src/lib/useVisitorData.ts @@ -34,13 +34,13 @@ export function useVisitorData( const getData: UseGetVisitorDataResult['getData'] = async (getDataOptions) => { loadingValue.set(true) - const options: UseVisitorDataOptions = { + const { ignoreCache, ...options }: UseVisitorDataOptions = { ...(topLevelOptions ?? {}), ...(getDataOptions ?? {}), } try { - const result = await context.getVisitorData(options, options.ignoreCache) + const result = await context.getVisitorData(options, ignoreCache) dataValue.set(result) errorValue.set(undefined)