@transcend-io/penumbra
Advanced tools
Comparing version 4.3.9 to 4.3.10
{ | ||
"name": "@transcend-io/penumbra", | ||
"version": "4.3.9", | ||
"version": "4.3.10", | ||
"description": "Crypto streams for the browser.", | ||
@@ -5,0 +5,0 @@ "main": "build/penumbra.js", |
@@ -47,6 +47,5 @@ /* eslint-disable import/no-webpack-loader-syntax */ | ||
const scriptElement: HTMLScriptElement = | ||
const scriptElement: HTMLScriptElement | undefined | null = | ||
document.currentScript || | ||
(document.querySelector('script[data-penumbra]') as any) || | ||
({ dataset: {} } as HTMLScriptElement); | ||
(document.querySelector('script[data-penumbra]') as any); | ||
@@ -57,5 +56,5 @@ /** | ||
function getScriptElement(): HTMLScriptElement { | ||
// if (!scriptElement) { | ||
// throw new Error('Unable to locate Penumbra script element.'); | ||
// } | ||
if (!scriptElement) { | ||
throw new Error('Unable to locate Penumbra script element.'); | ||
} | ||
return scriptElement; | ||
@@ -68,4 +67,3 @@ } | ||
function getScript(): DOMStringMap { | ||
// eslint-disable-next-line no-undef | ||
return getScriptElement()?.dataset || {}; | ||
return getScriptElement().dataset || {}; | ||
} | ||
@@ -72,0 +70,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
7161045
1093
119
37163