From 5e376b9399e937d29b3a5da557cfc34672d37739 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Wed, 18 May 2016 23:55:45 +0200 Subject: [PATCH] Fixed a case where formating the duration string caused errors if there was no duration --- .../webroot/ngax/scripts/controllers/HomeController.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Duplicati/Server/webroot/ngax/scripts/controllers/HomeController.js b/Duplicati/Server/webroot/ngax/scripts/controllers/HomeController.js index 12c40e917..1a5a26dc5 100644 --- a/Duplicati/Server/webroot/ngax/scripts/controllers/HomeController.js +++ b/Duplicati/Server/webroot/ngax/scripts/controllers/HomeController.js @@ -45,6 +45,9 @@ backupApp.controller('HomeController', function ($scope, $location, BackupList, }; $scope.formatDuration = function(duration) { - return duration.substring(0, duration.length - duration.indexOf(".")); + if (duration != null && duration.indexOf(".") > 0) + return duration.substring(0, duration.length - duration.indexOf(".")); + else + return duration; }; }); \ No newline at end of file