fix: Allow admin panel to init when c.tuple doesn't exists

This commit is contained in:
Eragon 2025-12-05 23:48:29 +01:00
commit cf77127335
No known key found for this signature in database
GPG key ID: 087126EBFC725006

View file

@ -107,6 +107,12 @@ const adminSettingsStorage = {
if (Array.isArray(value) && value.length > 0 && value[0].tuple) {
if (!preserveTuples) {
return value.reduce((acc, c) => {
if (c.tuple == null) {
return {
...acc,
[c]: c,
}
}
return {
...acc,
[c.tuple[0]]: convert(c.tuple[1], preserveTuplesLv2),