fixes bad binding in event listener

This commit is contained in:
Emmaline Autumn 2024-10-18 20:01:43 -06:00
parent 091a1d3518
commit 521802a0c1
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@bearmetal/store",
"version": "0.0.3",
"version": "0.0.5",
"description": "A simple store for storing data in a JSON file.",
"files": [
"mod.ts",

View File

@ -76,9 +76,9 @@ export class BearMetalStore {
this.writeOut();
}
private readIn() {
private readIn = () => {
this.store = JSON.parse(Deno.readTextFileSync(this.storePath) || "{}");
}
};
private writeOut() {
Deno.writeTextFileSync(this.storePath, JSON.stringify(this.store));