From 521802a0c17f98f63b661e348bf665c5f35229ed Mon Sep 17 00:00:00 2001 From: Emma Date: Fri, 18 Oct 2024 20:01:43 -0600 Subject: [PATCH] fixes bad binding in event listener --- deno.json | 2 +- store.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deno.json b/deno.json index dfafdef..6ef4226 100644 --- a/deno.json +++ b/deno.json @@ -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", diff --git a/store.ts b/store.ts index 6754310..bd53d54 100644 --- a/store.ts +++ b/store.ts @@ -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));