HAS_CRYPTO was actually checking for the opposite

This commit is contained in:
JC Brand 2013-11-16 11:52:45 +02:00
parent 774f0119b2
commit d1d896a3be
3 changed files with 7 additions and 7 deletions

View File

@ -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") &&

2
converse.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -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;