From 70647dc3d5685ec571887646c57bbfac1e9557f3 Mon Sep 17 00:00:00 2001 From: hyphenized <28708889+hyphenized@users.noreply.github.com> Date: Mon, 17 Oct 2022 13:12:06 -0500 Subject: [PATCH] fix: don't inject provider on non html documents --- provider-bridge/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/provider-bridge/index.ts b/provider-bridge/index.ts index 6d148e202c..8997d10714 100644 --- a/provider-bridge/index.ts +++ b/provider-bridge/index.ts @@ -67,6 +67,8 @@ export function connectProviderBridge(): void { } export function injectTallyWindowProvider(): void { + if (document.contentType !== "text/html") return + try { const container = document.head || document.documentElement const scriptTag = document.createElement("script")