Ver código fonte

HAS_CRYPTO was actually checking for the opposite

JC Brand 11 anos atrás
pai
commit
d1d896a3be
3 arquivos alterados com 6 adições e 6 exclusões
  1. 3 3
      converse.js
  2. 0 0
      converse.min.js
  3. 3 3
      src/bigint.js

+ 3 - 3
converse.js

@@ -57,9 +57,9 @@
         var KEY = {
             ENTER: 13
         };
-        var HAS_CSPRNG = ((typeof crypto === 'undefined') || (
-            (typeof crypto.randomBytes !== 'function') &&
-            (typeof crypto.getRandomValues !== 'function')
+        var HAS_CSPRNG = ((typeof crypto !== 'undefined') &&
+            ((typeof crypto.randomBytes === 'function') ||
+                (typeof crypto.getRandomValues === 'function')
         ));
         var HAS_CRYPTO = HAS_CSPRNG && (
             (typeof CryptoJS !== "undefined") &&

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
converse.min.js


+ 3 - 3
src/bigint.js

@@ -1666,9 +1666,9 @@
   }
 
   ;(function seed() {
-    var HAS_CSPRNG = ((typeof crypto === 'undefined') || 
-        ((typeof crypto.randomBytes !== 'function') &&
-            (typeof crypto.getRandomValues !== 'function')
+    var HAS_CSPRNG = ((typeof crypto !== 'undefined') &&
+        ((typeof crypto.randomBytes === 'function') ||
+            (typeof crypto.getRandomValues === 'function')
     ));
     if (!HAS_CSPRNG) {
         return;

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff