From 7af9aca418bcecd49277714f70f229794b3f113a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Sun, 21 Jun 2020 20:10:14 -0300 Subject: [PATCH] Fix in eventCalled For when an element don't have a classList. It was giving an error. Just a little fix. --- options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.js b/options.js index 346594e..fd65082 100644 --- a/options.js +++ b/options.js @@ -350,7 +350,7 @@ document.addEventListener("DOMContentLoaded", function() { .addEventListener("click", show_experimental); function eventCaller(event, className, funcName) { - if (!event.target.classList.contains(className)) { + if (!event.target.classList || !event.target.classList.contains(className)) { return; } funcName(event);