From cee2e066b95068b2c4ed172dc77ac17c04fbd107 Mon Sep 17 00:00:00 2001 From: TC Date: Mon, 1 Nov 2021 22:42:03 +0100 Subject: [PATCH] Fix apiLoaded event listener in video-toggle plugin --- plugins/video-toggle/front.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/video-toggle/front.js b/plugins/video-toggle/front.js index 45ee8c14..c72078dd 100644 --- a/plugins/video-toggle/front.js +++ b/plugins/video-toggle/front.js @@ -14,7 +14,7 @@ const switchButtonDiv = ElementFromFile( module.exports = (_options) => { if (_options.forceHide) return; options = _options; - document.addEventListener('apiLoaded', setup); + document.addEventListener('apiLoaded', setup, { once: true, passive: true }); } function setup() {