User page: weapon pool

This commit is contained in:
Kalle
2022-12-13 18:50:59 +02:00
parent 750e1708ee
commit 7945e1ecc7
24 changed files with 367 additions and 55 deletions

View File

@@ -10,3 +10,13 @@ export function parseDBJsonArray(value: any) {
// this is a workaround for that
return parsed.filter((item: any) => Object.values(item).some(Boolean));
}
export function parseDBArray(value: any) {
const parsed = JSON.parse(value);
if (parsed.length === 1 && parsed[0] === null) {
return [];
}
return parsed;
}