Skip to content

Commit

Permalink
Merge pull request #66 from MatissJanis/master
Browse files Browse the repository at this point in the history
fix: apply @actualbudget patch
  • Loading branch information
jlongster committed Aug 6, 2023
2 parents ade37d9 + 2e91c64 commit 1bff34f
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 1bff34f

Please sign in to comment.