From 3bdbd008f9f95e6a1d8da42e61a751289db17b60 Mon Sep 17 00:00:00 2001 From: Fraser Adams Date: Mon, 6 Jan 2014 14:49:50 +0000 Subject: 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 --- src/library_uuid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/library_uuid.js') 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); -- cgit v1.2.3-18-g5258