fix style

This commit is contained in:
hjlarry 2025-09-23 17:19:36 +08:00
parent d5dd73cacf
commit c1e9c56e25
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ export class EventEmitter {
const handlers = this.events.get(event)!
if (handler)
handlers.delete(handler)
else
else
handlers.clear()
if (handlers.size === 0)
@ -33,7 +33,7 @@ export class EventEmitter {
try {
handler(data)
}
catch (error) {
catch (error) {
console.error(`Error in event handler for ${event}:`, error)
}
})