From 557d0de60a161c39a848167107c78bd5882f0f76 Mon Sep 17 00:00:00 2001 From: HardiReady Date: Sat, 2 Feb 2019 23:52:02 +0100 Subject: [PATCH] Fix log timestamp precision (CC-75) --- package.json | 2 +- server/tools/log-parse-tool.js | 1 + static/src/app/statistic/war/war-submit/war-submit.component.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b8ba80d..885dd08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opt-cc", - "version": "1.8.5", + "version": "1.8.6", "author": "Florian Hartwich ", "private": true, "scripts": { diff --git a/server/tools/log-parse-tool.js b/server/tools/log-parse-tool.js index 15a066b..2152ab3 100644 --- a/server/tools/log-parse-tool.js +++ b/server/tools/log-parse-tool.js @@ -448,6 +448,7 @@ const getFullTimeDate = (date, timeString) => { const time = timeString.split(':'); returnDate.setHours(time[0]); returnDate.setMinutes(time[1]); + returnDate.setSeconds(time[2]); return returnDate; }; diff --git a/static/src/app/statistic/war/war-submit/war-submit.component.ts b/static/src/app/statistic/war/war-submit/war-submit.component.ts index e530c04..c1530dc 100644 --- a/static/src/app/statistic/war/war-submit/war-submit.component.ts +++ b/static/src/app/statistic/war/war-submit/war-submit.component.ts @@ -90,7 +90,7 @@ export class WarSubmitComponent { error => { this.spinnerService.deactivate(); this.loading = false; - const errorMsg = JSON.parse(error._body).error.message; + const errorMsg = error._body ? JSON.parse(error._body).error.message : error.error.error.message; this.snackBarService.showError('Error: '.concat(errorMsg), 15000); }); }