aboutsummaryrefslogtreecommitdiff
path: root/src/library_uuid.js
diff options
context:
space:
mode:
authorFraser Adams <fraser.adams@blueyonder.co.uk>2014-01-06 14:49:50 +0000
committerFraser Adams <fraser.adams@blueyonder.co.uk>2014-01-06 14:49:50 +0000
commit3bdbd008f9f95e6a1d8da42e61a751289db17b60 (patch)
tree2dab07ecaf099c22750bc9b954e17b9944411723 /src/library_uuid.js
parent385a660a1868dc1777b251dfcf83371ccd388b02 (diff)
changed != to !== in a couple of places. Added fix to prevent closure minifying crypto randomBytes etc. this fix makes use of closure externs so I've added a closure-externs.js to hold the definitions and modified tools/shared.py closure_compiler method to point to closure-externs.js. I've added externs to fix minification of the ws library used in library_sockfs.js too
Diffstat (limited to 'src/library_uuid.js')
-rw-r--r--src/library_uuid.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library_uuid.js b/src/library_uuid.js
index cce0a4f8..9a0377ae 100644
--- a/src/library_uuid.js
+++ b/src/library_uuid.js
@@ -35,8 +35,8 @@ mergeInto(LibraryManager.library, {
var rb = require('crypto').randomBytes;
uuid = rb(16);
} catch(e) {}
- } else if (typeof(window.crypto) != 'undefined' &&
- typeof(window.crypto.getRandomValues) != 'undefined') {
+ } else if (typeof(window.crypto) !== 'undefined' &&
+ typeof(window.crypto.getRandomValues) !== 'undefined') {
// If crypto.getRandomValues is available try to use it.
uuid = new Uint8Array(16);
window.crypto.getRandomValues(uuid);