Browse Source

修复 uuid 方法调用异常 9a5bc896

cc12458 4 tháng trước cách đây
mục cha
commit
ca4b997e56
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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) {