Add filter for missing WI entries

This commit is contained in:
Cohee 2023-11-04 20:02:38 +02:00
parent 81e52fb77c
commit 2d3fb08638
1 changed files with 5 additions and 1 deletions

View File

@ -398,7 +398,7 @@ function displayWorldEntries(name, data, navigation = navigation_option.none) {
Trigger %
</small>
</div>`
const blocks = page.map(entry => getWorldEntry(name, data, entry));
const blocks = page.map(entry => getWorldEntry(name, data, entry)).filter(x => x);
$("#world_popup_entries_list").append(keywordHeaders);
$("#world_popup_entries_list").append(blocks);
},
@ -559,6 +559,10 @@ function deleteOriginalDataValue(data, uid) {
}
function getWorldEntry(name, data, entry) {
if (!data.entries[entry.uid]) {
return;
}
const template = $("#entry_edit_template .world_entry").clone();
template.data("uid", entry.uid);
template.attr("uid", entry.uid);