mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fixing invalidDate error if no timestamp provided
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
b4e6aacb84
commit
8d9339d803
2 files changed
+2
-2
No files matched your search
@@ -116,7 +116,7 @@ export class LogList extends React.Component<Props> {
|
|||||||
|
|
||||||
return this.props.logs
|
return this.props.logs
|
||||||
.map(log => logStore.splitOutTimestamp(log))
|
.map(log => logStore.splitOutTimestamp(log))
|
||||||
.map(([logTimestamp, log]) => (`${moment.tz(logTimestamp, UserStore.getInstance().localeTimezone).format()}${log}`));
|
.map(([logTimestamp, log]) => (`${logTimestamp && moment.tz(logTimestamp, UserStore.getInstance().localeTimezone).format()}${log}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ export class LogStore {
|
|||||||
const extraction = /^(\d+\S+)(.*)/m.exec(logs);
|
const extraction = /^(\d+\S+)(.*)/m.exec(logs);
|
||||||
|
|
||||||
if (!extraction || extraction.length < 3) {
|
if (!extraction || extraction.length < 3) {
|
||||||
return ["", ""];
|
return ["", logs];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [extraction[1], extraction[2]];
|
return [extraction[1], extraction[2]];
|
||||||
|
|||||||
Reference in new issue
Block a user