Skip to content

Commit

Permalink
fix bug in write file
Browse files Browse the repository at this point in the history
  • Loading branch information
zsattari committed Jul 13, 2021
1 parent c9e0aac commit 9e2a18e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export const create = <T>(
}
: data;

path && (await ensureFile(path!))&&(await Deno.writeTextFile(path, JSON.stringify(data)));
path && await ensureFile(path)
path && await Deno.writeTextFile(path, JSON.stringify(data))
};

return {
Expand Down

0 comments on commit 9e2a18e

Please sign in to comment.