@mushi-mushi/core 1.22.2 → 1.22.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -47,7 +47,10 @@ function getSubtle() {
47
47
  try {
48
48
  const g = globalThis;
49
49
  const crypto2 = g["crypto"];
50
- if (crypto2?.subtle) return crypto2.subtle;
50
+ const subtle = crypto2?.subtle;
51
+ if (subtle && typeof subtle.digest === "function" && typeof subtle.importKey === "function" && typeof subtle.sign === "function") {
52
+ return subtle;
53
+ }
51
54
  } catch {
52
55
  }
53
56
  return null;