From c0aadc197218f3315cfd3ba2492a81a0330e0b90 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 3 Sep 2014 20:14:55 -0400 Subject: [PATCH] this fixes one part of #207 --- js/contentscript-end.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/contentscript-end.js b/js/contentscript-end.js index 4c1801f83..099e0a779 100644 --- a/js/contentscript-end.js +++ b/js/contentscript-end.js @@ -281,6 +281,11 @@ var uBlockMessaging = (function(name){ }; var hideElements = function(selectors) { + // https://github.com/gorhill/uBlock/issues/207 + // Do not call querySelectorAll() using invalid CSS selectors + if ( selectors.length === 0 ) { + return; + } if ( document.body === null ) { return; }