From b07972c526d094788d3c8decb5b1ac97288af0bb Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 7 Apr 2017 07:23:43 -0400 Subject: [PATCH] minor code review --- platform/chromium/vapi-client.js | 2 +- platform/chromium/vapi-common.js | 2 +- platform/firefox/vapi-client.js | 2 +- platform/firefox/vapi-common.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/chromium/vapi-client.js b/platform/chromium/vapi-client.js index 0ffe987..ccfbc16 100644 --- a/platform/chromium/vapi-client.js +++ b/platform/chromium/vapi-client.js @@ -30,7 +30,7 @@ /******************************************************************************/ // https://bugs.chromium.org/p/project-zero/issues/detail?id=1225&desc=6#c10 -if ( !self.vAPI || !self.vAPI.uMatrix ) { +if ( self.vAPI === undefined || self.vAPI.uMatrix !== true ) { self.vAPI = { uMatrix: true }; } diff --git a/platform/chromium/vapi-common.js b/platform/chromium/vapi-common.js index f9f234a..e6a3a70 100644 --- a/platform/chromium/vapi-common.js +++ b/platform/chromium/vapi-common.js @@ -31,7 +31,7 @@ /******************************************************************************/ // https://bugs.chromium.org/p/project-zero/issues/detail?id=1225&desc=6#c10 -if ( !self.vAPI || !self.vAPI.uMatrix ) { +if ( self.vAPI === undefined || self.vAPI.uMatrix !== true ) { self.vAPI = { uMatrix: true }; } diff --git a/platform/firefox/vapi-client.js b/platform/firefox/vapi-client.js index 65fccb0..c101e32 100644 --- a/platform/firefox/vapi-client.js +++ b/platform/firefox/vapi-client.js @@ -33,7 +33,7 @@ /******************************************************************************/ // https://bugs.chromium.org/p/project-zero/issues/detail?id=1225&desc=6#c10 -if ( !self.vAPI || !self.vAPI.uMatrix ) { +if ( self.vAPI === undefined || self.vAPI.uMatrix !== true ) { self.vAPI = { uMatrix: true }; } diff --git a/platform/firefox/vapi-common.js b/platform/firefox/vapi-common.js index 994045b..4d6f9e2 100644 --- a/platform/firefox/vapi-common.js +++ b/platform/firefox/vapi-common.js @@ -37,7 +37,7 @@ const {Services} = Components.utils.import( ); // https://bugs.chromium.org/p/project-zero/issues/detail?id=1225&desc=6#c10 -if ( !self.vAPI || !self.vAPI.uMatrix ) { +if ( self.vAPI === undefined || self.vAPI.uMatrix !== true ) { self.vAPI = { uMatrix: true }; }