We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a1718b commit 6bc5f04Copy full SHA for 6bc5f04
packages/core/useBase64/index.ts
@@ -1,5 +1,5 @@
1
import { Ref, ref, unref, watch } from 'vue-demi'
2
-import { MaybeRef } from '@vueuse/shared'
+import { isClient, MaybeRef } from '@vueuse/shared'
3
4
export interface ToDataURLOptions {
5
/**
@@ -31,6 +31,9 @@ export function useBase64(
31
const promise = ref() as Ref<Promise<string>>
32
33
function execute() {
34
+ if (!isClient)
35
+ return
36
+
37
promise.value = new Promise<string>((resolve, reject) => {
38
try {
39
const _target = unref(target)
0 commit comments