From 2aae2d2e4e0d3a9074cec52fcbbaeb221e8e7dde Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Fri, 4 Nov 2022 18:58:23 +0100 Subject: [PATCH] chore(docs): use blobity only on client side --- docs/components/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/components/utils.ts b/docs/components/utils.ts index 935b56ef..18d4d24a 100644 --- a/docs/components/utils.ts +++ b/docs/components/utils.ts @@ -1,5 +1,6 @@ import Blobity from 'blobity' import type { InjectionKey, Ref } from 'vue' +import { isClient } from '@vueuse/core' const BlobityInjection: InjectionKey> = Symbol('blobity') @@ -18,7 +19,7 @@ const defaultOptions = { } export const useBlobity = createSharedComposable(() => { - const blobity = ref(new Blobity(defaultOptions as any)) + const blobity = ref(isClient ? new Blobity(defaultOptions as any) : (null as any)) provide(BlobityInjection, blobity)