Skip to content

Commit

Permalink
fix: Avoid throwing if caches is undeclared (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
koistya committed Mar 2, 2023
1 parent 8e66008 commit 42a722e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/* SPDX-License-Identifier: MIT */

export const canUseDefaultCache =
typeof self.caches?.default?.put === "function";
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
typeof (globalThis as any).caches?.default?.put === "function";
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-auth-library",
"version": "1.0.2",
"version": "1.0.3",
"packageManager": "[email protected]",
"description": "Authentication library for the browser environment using Web Crypto API",
"license": "MIT",
Expand Down

0 comments on commit 42a722e

Please sign in to comment.