From 26e940595307b602cc132b89b2d34fcd69e8737e Mon Sep 17 00:00:00 2001 From: Sinan Ascioglu Date: Mon, 11 Apr 2022 19:12:57 +0100 Subject: [PATCH] fix: color palette option query string importing fixed It was taking it as a string. Now converts it to an array, as it should. --- opc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opc.js b/opc.js index 24624b1..a61d62a 100644 --- a/opc.js +++ b/opc.js @@ -48,8 +48,8 @@ class OPC { //check existing params let url = new URL(document.location.href); if (url && url.searchParams.has(variableName)) { - //if found, ignore requested value, replace with URL param - value = url.searchParams.get(variableName); + //Note: query params are all strings, so turn it to array + value = url.searchParams.get(variableName).split(','); } this.options[variableName] = {