1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

[~] fix regex extraction

Signed-off-by: Arthur Knoepflin <arthur@knoepflin.eu>
This commit is contained in:
Arthur Knoepflin 2021-04-16 09:17:20 +02:00
parent 0c121b7086
commit 9f3c5affd5
No known key found for this signature in database
GPG Key ID: BB1E0D36309AD6DD

View File

@ -147,9 +147,9 @@ export class LogStore {
} }
splitOutTimestamp(logs: string): [string, string] { 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 ["", ""]; return ["", ""];
} }