From bf5b754acc736767961d739f854d2d9a3680c9e6 Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Mon, 14 Oct 2024 12:49:14 +0530 Subject: [PATCH] Update dataAttrListener.js --- src/Scripts/dataAttrListener.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Scripts/dataAttrListener.js b/src/Scripts/dataAttrListener.js index f527fef..c2f610b 100644 --- a/src/Scripts/dataAttrListener.js +++ b/src/Scripts/dataAttrListener.js @@ -14,6 +14,16 @@ domReady( () => { // } function renderModal( pluginName, pluginSlug, pluginURL, activate ) { + // Don't make requests if values not provided. + if ( + '' === pluginName || + '' === pluginSlug || + '' === pluginURL || + '' === activate + ) { + return; + } + // create the installer div document.getElementById( INSTALLER_DIV ).style.display = 'block'; document