diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/core-utils/i18n/i18n.ts | 2 | ||||
-rw-r--r-- | shared/server-commands/server/server.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/shared/core-utils/i18n/i18n.ts b/shared/core-utils/i18n/i18n.ts index abc7acc8b..b720fb84e 100644 --- a/shared/core-utils/i18n/i18n.ts +++ b/shared/core-utils/i18n/i18n.ts | |||
@@ -82,7 +82,7 @@ export function isDefaultLocale (locale: string) { | |||
82 | } | 82 | } |
83 | 83 | ||
84 | export function peertubeTranslate (str: string, translations?: { [ id: string ]: string }) { | 84 | export function peertubeTranslate (str: string, translations?: { [ id: string ]: string }) { |
85 | if (!translations || !translations[str]) return str | 85 | if (!translations?.[str]) return str |
86 | 86 | ||
87 | return translations[str] | 87 | return translations[str] |
88 | } | 88 | } |
diff --git a/shared/server-commands/server/server.ts b/shared/server-commands/server/server.ts index c062e6986..f2ca51431 100644 --- a/shared/server-commands/server/server.ts +++ b/shared/server-commands/server/server.ts | |||
@@ -259,7 +259,7 @@ export class PeerTubeServer { | |||
259 | 259 | ||
260 | const onPeerTubeExit = () => rej(new Error('Process exited:\n' + aggregatedLogs)) | 260 | const onPeerTubeExit = () => rej(new Error('Process exited:\n' + aggregatedLogs)) |
261 | const onParentExit = () => { | 261 | const onParentExit = () => { |
262 | if (!this.app || !this.app.pid) return | 262 | if (!this.app?.pid) return |
263 | 263 | ||
264 | try { | 264 | try { |
265 | process.kill(self.app.pid) | 265 | process.kill(self.app.pid) |