From a98f115b452a6f552ac37ae55c85e6414c6ef737 Mon Sep 17 00:00:00 2001 From: Stanislav A Date: Thu, 6 Oct 2022 18:04:20 +0300 Subject: [PATCH] guard selectors arg --- src/scriptlets/trusted-click-element.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scriptlets/trusted-click-element.js b/src/scriptlets/trusted-click-element.js index f11f15d5..d79a679b 100644 --- a/src/scriptlets/trusted-click-element.js +++ b/src/scriptlets/trusted-click-element.js @@ -54,6 +54,9 @@ import { */ /* eslint-enable max-len */ export function trustedClickElement(source, selectors, delay, extraMatch = '') { + if (!selectors) { + return; + } // eslint-disable-next-line no-console const log = console.log.bind(console);