mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-16 12:52:38 +00:00
Enable the @typescript-eslint/no-non-null-assertion eslint rule (#1899)
## Description: Enable the `@typescript-eslint/no-non-null-assertion` eslint rule. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
This commit is contained in:
@@ -44,13 +44,17 @@ export class WorkerClient {
|
||||
break;
|
||||
|
||||
case "initialized":
|
||||
default:
|
||||
if (message.id && this.messageHandlers.has(message.id)) {
|
||||
const handler = this.messageHandlers.get(message.id)!;
|
||||
default: {
|
||||
if (message.id === undefined) return;
|
||||
const handler = this.messageHandlers.get(message.id);
|
||||
if (handler === undefined) return;
|
||||
try {
|
||||
handler(message);
|
||||
} finally {
|
||||
this.messageHandlers.delete(message.id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user