mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-11 06:28:28 +00:00
strictNullChecks
This commit is contained in:
@@ -99,7 +99,7 @@ export class InputHandler {
|
||||
|
||||
private alternateView = false;
|
||||
|
||||
private moveInterval: NodeJS.Timeout = null;
|
||||
private moveInterval: NodeJS.Timeout | null = null;
|
||||
private activeKeys = new Set<string>();
|
||||
|
||||
private readonly PAN_SPEED = 5;
|
||||
@@ -392,7 +392,9 @@ export class InputHandler {
|
||||
}
|
||||
|
||||
destroy() {
|
||||
clearInterval(this.moveInterval);
|
||||
if (this.moveInterval !== null) {
|
||||
clearInterval(this.moveInterval);
|
||||
}
|
||||
this.activeKeys.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user