Skip to content

Commit

Permalink
fix: color palette option query string importing fixed
Browse files Browse the repository at this point in the history
It was taking it as a string. Now converts it to an array, as it should.
  • Loading branch information
msawired committed Apr 11, 2022
1 parent 9b768aa commit 26e9405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down

0 comments on commit 26e9405

Please sign in to comment.