Skip to content

Commit

Permalink
fix: apply @actualbudget patch
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis committed Jun 28, 2023
1 parent ade37d9 commit 2e91c64
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "absurd-sql",
"version": "0.0.53",
"version": "0.0.54",
"main": "./dist/index.js",
"scripts": {
"build": "rm -rf dist && rollup -c rollup.config.js",
Expand Down
14 changes: 12 additions & 2 deletions src/sqlite-fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,22 @@ export default class SQLiteFS {

lock(path, lockType) {
let { node } = this.FS.lookupPath(path);
return node.contents.lock(lockType);

if (node && node.contents) {
return node.contents.lock(lockType);
}

return true;
}

unlock(path, lockType) {
let { node } = this.FS.lookupPath(path);
return node.contents.unlock(lockType);

if (node && node.contents) {
return node.contents.unlock(lockType);
}

return true;
}

createNode(parent, name, mode, dev) {
Expand Down

0 comments on commit 2e91c64

Please sign in to comment.