Skip to content

Commit 42a722e

Browse files
committed
fix: Avoid throwing if caches is undeclared (#13)
1 parent 8e66008 commit 42a722e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: core/env.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
/* SPDX-License-Identifier: MIT */
33

44
export const canUseDefaultCache =
5-
typeof self.caches?.default?.put === "function";
5+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
6+
typeof (globalThis as any).caches?.default?.put === "function";

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web-auth-library",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"packageManager": "[email protected]",
55
"description": "Authentication library for the browser environment using Web Crypto API",
66
"license": "MIT",

0 commit comments

Comments
 (0)