Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 09079dd

Browse files
committed
Prevent timestampFormat from being undefined
1 parent 0628fb0 commit 09079dd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/serialmonitor/serialMonitor.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ export class SerialMonitor implements vscode.Disposable {
228228

229229
public async changeTimestampFormat() {
230230
const timestampFormat = await vscode.window.showInputBox();
231+
if (!timestampFormat) {
232+
Logger.warn("No timestamp format inputted, keeping previous timestamp format.");
233+
return;
234+
}
231235
await this._serialPortCtrl.changeTimestampFormat(timestampFormat);
232236
this._currentTimestampFormat = timestampFormat;
233237
this._timestampFormatStatusBar.tooltip = `Timestamp Format: "${timestampFormat}"`;

0 commit comments

Comments
 (0)