Skip to content

Commit

Permalink
Reduce issues with filters on broken log
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jan 18, 2024
1 parent 707ebad commit 9b8e117
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions create-filter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,14 @@ export function createFilter(client, Template, filter = {}, opts = {}) {

async function loadAndCheck(child) {
let clear = child.listen(() => {})
if (child.value.isLoading) await child.loading
if (checkAllFields(child.value)) {
await add(child)
try {
if (child.value.isLoading) await child.loading
if (checkAllFields(child.value)) {
await add(child)
}
} finally {
clear()
}
clear()
}

for (let i in Template.cache) {
Expand Down

0 comments on commit 9b8e117

Please sign in to comment.