Skip to content

Commit

Permalink
Only check the book defined on the same element as the slug
Browse files Browse the repository at this point in the history
Match ranges to target specific book node for validation
  • Loading branch information
TylerZeroMaster committed Jul 1, 2024
1 parent 30bf229 commit 3c360fe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server/src/model/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,13 @@ export class Bundle extends Fileish implements Bundleish {
nodesToLoad: this.books,
fn: () => booksXMLBooks
.filter(
({ v: bx }) => books.filter(
({ v: b }) => b.isValidXML && b.exists && b.slug === bx.slug
({ v: bx, range: xr }) => books.filter(
({ v: b, range: br }) =>
xr.start === br.start &&
xr.end === br.end &&
b.isValidXML &&
b.exists &&
b.slug === bx.slug
).size === 0
)
.map(bx => bx.range)
Expand Down

0 comments on commit 3c360fe

Please sign in to comment.