Skip to content

Commit

Permalink
fix custom links
Browse files Browse the repository at this point in the history
  • Loading branch information
jemikanegara committed Oct 21, 2024
1 parent 2ee9ae3 commit a6382d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extractOptionsFromScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function extractOptionsFromScript(window, optsArgs = {
let customLinks = {};
try {
// format: [oldUrl,newUrl], [oldUrl,newUrl]
const parsed = JSON.parse(`[${customLinksAttribute}]`);
const parsed = JSON.parse(`[${customLinksAttribute.replaceAll('\'', '"')}]`);
customLinks = parsed.reduce((acc, [oldUrl, newUrl]) => {
acc[oldUrl] = newUrl;
return acc;
Expand Down

0 comments on commit a6382d4

Please sign in to comment.