From 741684329a7fcaca2e6dd25fd98b22aeac368551 Mon Sep 17 00:00:00 2001 From: Xmader Date: Sun, 6 Dec 2020 12:32:13 -0500 Subject: [PATCH] fix: cli error --- src/gm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gm.ts b/src/gm.ts index 83dd851..230d3d7 100644 --- a/src/gm.ts +++ b/src/gm.ts @@ -12,7 +12,7 @@ declare const GM: { /** https://github.com/Tampermonkey/tampermonkey/issues/881#issuecomment-639705679 */ addElement (tagName: K, properties: Record): Promise; } -export const _GM = GM +export const _GM = (typeof GM === 'object' ? GM : undefined) as GM type GM = typeof GM