fix(LayServer) private variable typo
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user