From e4508620d0527feaba9fe47e7bffe8da6528781a Mon Sep 17 00:00:00 2001 From: gh0sTedBuddy Date: Tue, 2 Apr 2024 02:47:52 +0100 Subject: [PATCH] fix(LayServer) private variable typo --- src/LayServer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LayServer.js b/src/LayServer.js index a945680..14802fe 100644 --- a/src/LayServer.js +++ b/src/LayServer.js @@ -255,7 +255,7 @@ export default class LayServer extends BaseRouter { */ async listen(port = 8080, cb = () => {}) { try { - this.proc = await Bun.serve({ + this.#proc = await Bun.serve({ port, development: Bun.env.BUN_ENV != 'production', fetch: this.handleRequest.bind(this), @@ -269,12 +269,12 @@ export default class LayServer extends BaseRouter { }, }); - if (!this.proc) { + if (!this.#proc) { throw new Error('something went wrong'); } if (!!cb && cb.constructor?.name.endsWith('Function')) { - cb(this.proc); + cb(this.#proc); } } catch (err) { Logger.error('where', err.stack);