Skip to content
Snippets Groups Projects
Commit ff291491 authored by Eric Oulashin's avatar Eric Oulashin
Browse files

ddmr_cfg.js: Added a type check that should fix an 'undefined' error when formatting option values

parent ba84e207
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!365ddmr_cfg.js: Added a type check that should fix an 'undefined' error when formatting option values
Pipeline #4897 passed
......@@ -288,7 +288,10 @@ function formatCfgMenuText(pItemTextMaxLen, pItemText, pVal)
if (valType === "boolean")
value = pVal ? "Yes" : "No";
else
value = pVal.toString();
{
if (typeof(pVal) !== "undefined")
value = pVal.toString();
}
return format(formatCfgMenuText.formatStr, pItemText.substr(0, pItemTextMaxLen), value);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment