chore: remove empty entries from flags in compendium packs
This commit is contained in:
parent
41a4685872
commit
b46c51c9f0
2 changed files with 6 additions and 3 deletions
|
@ -58,6 +58,11 @@ function cleanPackEntry(entry, cleanSourceId = true) {
|
|||
if (cleanSourceId) {
|
||||
delete entry.flags?.core?.sourceId;
|
||||
}
|
||||
Object.keys(entry.flags).forEach((scope) => {
|
||||
if (Object.keys(entry.flags[scope]).length === 0) {
|
||||
delete entry.flags[scope];
|
||||
}
|
||||
});
|
||||
if (entry.permission) entry.permission = { default: 0 };
|
||||
|
||||
const embeddedDocumentCollections = [
|
||||
|
|
|
@ -5477,9 +5477,7 @@
|
|||
"permission": {
|
||||
"default": 0
|
||||
},
|
||||
"flags": {
|
||||
"core": {}
|
||||
}
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"_id": "CIzMY691MK016h4E",
|
||||
|
|
Loading…
Reference in a new issue