From 6d79aa43babb8330e7e91b4f2071979b220ef365 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 21 Apr 2016 12:48:07 -0400 Subject: [PATCH] #956/#1497: minor code review --- platform/chromium/vapi-client.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/chromium/vapi-client.js b/platform/chromium/vapi-client.js index 69fa7244e..bed173ef9 100644 --- a/platform/chromium/vapi-client.js +++ b/platform/chromium/vapi-client.js @@ -349,8 +349,11 @@ vAPI.shutdown.add(function() { // search for "https://github.com/gorhill/uBlock/issues/1497". (function() { - // Don't bother if WebSocket is not supported. - if ( window.WebSocket instanceof Function === false ) { + // Fix won't be applied on older versions of Chromium. + if ( + window.WebSocket instanceof Function === false || + window.WeakMap instanceof Function === false + ) { return; }