[~] fix regex extraction

Signed-off-by: Arthur Knoepflin <arthur@knoepflin.eu>
This commit is contained in:
Arthur Knoepflin committed 2021-04-19 23:02:29 +02:00
1 parent 0c121b7086
commit 9f3c5affd5
1 file changed
+2 -2
+2 -2
View File
@@ -147,9 +147,9 @@ export class LogStore {
}
splitOutTimestamp(logs: string): [string, string] {
const extraction = /^(\d+\S+) (.*)/gm.exec(logs);
const extraction = /^(\d+\S+) (.*)/m.exec(logs);
if (extraction.length < 3) {
if (!extraction || extraction.length < 3) {
return ["", ""];
}