From 4631b1b93fbb5161f3be9996b5734acc13f6cf0c Mon Sep 17 00:00:00 2001 From: Julien Mourer Date: Wed, 8 May 2019 20:47:17 +0200 Subject: [PATCH] Add `window` and `document` to globals To prevent the following warning message: ``` (!) svelte plugin: 'window' is not defined src/templates/Share.svelte 20: 21: 22: {#if window.navigator.share} ^ 23: 24: {:else} ``` --- src/utils/names.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/names.ts b/src/utils/names.ts index 2eafdf06a3..f1413548aa 100644 --- a/src/utils/names.ts +++ b/src/utils/names.ts @@ -10,6 +10,7 @@ export const globals = new Set([ 'Date', 'decodeURI', 'decodeURIComponent', + 'document', 'encodeURI', 'encodeURIComponent', 'Infinity', @@ -31,6 +32,7 @@ export const globals = new Set([ 'Set', 'String', 'undefined', + 'window', ]); export const reserved = new Set([