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", "name": "@bearmetal/store",
"version": "0.0.3", "version": "0.0.5",
"description": "A simple store for storing data in a JSON file.", "description": "A simple store for storing data in a JSON file.",
"files": [ "files": [
"mod.ts", "mod.ts",

View File

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