Quellcode durchsuchen

修复 uuid 方法调用异常 9a5bc896

cc12458 vor 4 Monaten
Ursprung
Commit
ca4b997e56
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/tool/uuid.js

+ 1 - 1
src/tool/uuid.js

@@ -1,6 +1,6 @@
 let randomUUID = () => {
   try {
-    if (typeof crypto?.randomUUID === 'function') randomUUID = crypto.randomUUID.bind(crypto);
+    randomUUID = crypto.randomUUID.bind(crypto);
   } catch (e) {
     randomUUID = () => {
       return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {