allow FactorioServer.version to return undefined

This commit is contained in:
CCpersonguy authored and Danielv123 committed 2024-05-15 09:50:39 +01:00
1 parent 8a57d9b5f6
commit dc2f86dcf3
4 files changed
+9 -10

No files matched your search

+5 -5
View File
@@ -725,12 +725,12 @@ export class FactorioServer extends events.EventEmitter {
}
/**
* The version of Factorio in use. This will be the actual version if
* "latest" (the default) was specified as `factorioVersion` to the
* constructor.
* The version of Factorio in use. This will be the actual version if
* "latest" (the default) was specified as `factorioVersion` to the constructor.
* This will be undefined before the server is initialized, or if init failed.
*/
get version() {
return this._version!;
get version(): string | undefined {
return this._version ?? undefined;
}
/**