Skip to content

Commit

Permalink
import: interpret any non-false value as truish in duplicate metadata
Browse files Browse the repository at this point in the history
beangulp sets the __duplicate__ metadata to reference the duplicated
transaction, so do not only check for `true` but for any value present
unless it's false. Even better future improvement would be to show the
duplicated entry (as a printed string possibl)
  • Loading branch information
yagebu committed Jan 4, 2025
1 parent 20621a8 commit 3365454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,5 +346,5 @@ export const entryValidator: Validator<Entry> = tagged_union("t", {
* Check whether the given entry is marked as duplicate (used in imports).
*/
export function isDuplicate(e: Entry): boolean {
return e.meta.__duplicate__ === true;
return e.meta.__duplicate__ != null && e.meta.__duplicate__ !== false;
}

0 comments on commit 3365454

Please sign in to comment.