Merge pull request #2318 from coreos-inc/FIX-date-type-error

fix(js/logs-view): check for valid date
This commit is contained in:
Erica 2017-01-30 17:00:10 -05:00 committed by GitHub
commit 5d1c2d1881

View file

@ -330,7 +330,12 @@ angular.module('quay').directive('logsView', function () {
var hasValidUser = !!$scope.user;
var hasValidOrg = !!$scope.organization;
var hasValidRepo = $scope.repository && $scope.repository.namespace;
var isValid = hasValidUser || hasValidOrg || hasValidRepo || $scope.allLogs;
var isValidEndpoint = hasValidUser || hasValidOrg || hasValidRepo || $scope.allLogs;
var hasValidLogStartDate = !!$scope.options.logStartDate;
var hadValidLogEndDate = !!$scope.options.logEndDate;
var isValid = isValidEndpoint && hasValidLogStartDate && hasValidLogEndDate;
if (!$scope.makevisible || !isValid) {
return;