Skip to content

Commit

Permalink
Add support old (wrong) expression
Browse files Browse the repository at this point in the history
  • Loading branch information
K0R0L committed Oct 23, 2024
1 parent 8c31fac commit 8884709
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/common/main/lib/util/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,9 @@ define([], function () {
"extension" : { origin : "", values : [] }
};

// For bug in version <= 8.2.0
let initScaleAddon = "";

let param_parse = function(name) {
let posOrigin = icons.indexOf("%" + name + "%");
if (posOrigin === -1)
Expand All @@ -1407,7 +1410,10 @@ define([], function () {
return;
let pos2 = icons.indexOf(")", pos1);
params_array[name].origin = icons.substring(posOrigin, pos2 + 1);
params_array[name].values = icons.substring(pos1 + 1, pos2).split("|");
params_array[name].values = icons.substring(pos1 + 1, pos2).split("|");

if ("scale" === name && posOrigin > 0 && icons.charCodeAt(posOrigin - 1) == 47)
initScaleAddon = "icon";
};

for (let name in params_array)
Expand Down Expand Up @@ -1486,7 +1492,7 @@ define([], function () {

let urlAll = url;
if (params_array["scale"].origin != "")
urlAll = urlAll.replaceAll(params_array["scale"].origin, addonScale);
urlAll = urlAll.replaceAll(params_array["scale"].origin, initScaleAddon + addonScale);
if (params_array["extension"].origin != "")
urlAll = urlAll.replaceAll(params_array["extension"].origin, (isAll && isSvgPresent) ? "svg" : rasterExt);

Expand Down

0 comments on commit 8884709

Please sign in to comment.