Skip to content

Commit

Permalink
Merge pull request #28 from 91khr/main
Browse files Browse the repository at this point in the history
fix lib/db: with_path not set data when it's falsy
  • Loading branch information
Lhcfl authored Oct 20, 2023
2 parents 2654905 + 77bd535 commit 9c7f79b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,7 @@ export class DBManager {
await using subdb = await this.get_subpath<T>(base);
const key = base[base.length - 1];
const data = await transaction(subdb.data[key]);
if (data) {
subdb.data[key] = data;
}
if (data !== undefined) subdb.data[key] = data;
return data;
}
}
Expand Down

0 comments on commit 9c7f79b

Please sign in to comment.