diff --git a/src/use-swr.ts b/src/use-swr.ts index d769e8082..aca60c408 100644 --- a/src/use-swr.ts +++ b/src/use-swr.ts @@ -24,7 +24,8 @@ import { updaterInterface } from './types' -const IS_SERVER = typeof window === 'undefined' +// @ts-ignore +const IS_SERVER = typeof window === 'undefined' || !!(typeof Deno !== 'undefined' && Deno && Deno.version && Deno.version.deno) // polyfill for requestAnimationFrame const rAF = IS_SERVER