fix jshint issue

This commit is contained in:
John Mitchell
2017-02-01 12:26:23 -05:00
parent 1935183ebc
commit e9a64c5022

View File

@@ -580,11 +580,11 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
}); });
}; };
var bufferInterval = undefined; var bufferInterval;
// Processing of job_events messages from the websocket // Processing of job_events messages from the websocket
toDestroy.push($scope.$on(`ws-job_events-${$scope.job.id}`, function(e, data) { toDestroy.push($scope.$on(`ws-job_events-${$scope.job.id}`, function(e, data) {
if (bufferInterval === undefined) { if (!bufferInterval) {
bufferInterval = setInterval(function(){ bufferInterval = setInterval(function(){
processBuffer(); processBuffer();
}, 500); }, 500);
@@ -631,7 +631,7 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
data.status === "error" || data.status === "error" ||
data.status === "canceled") { data.status === "canceled") {
clearInterval(elapsedInterval); clearInterval(elapsedInterval);
if (bufferInterval !== undefined) { if (bufferInterval) {
clearInterval(bufferInterval); clearInterval(bufferInterval);
} }
// When the fob is finished retrieve the job data to // When the fob is finished retrieve the job data to
@@ -665,7 +665,7 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
}); });
$scope.events = {}; $scope.events = {};
clearInterval(elapsedInterval); clearInterval(elapsedInterval);
if (bufferInterval !== undefined) { if (bufferInterval) {
clearInterval(bufferInterval); clearInterval(bufferInterval);
} }
toDestroy.forEach(closureFunc => closureFunc()); toDestroy.forEach(closureFunc => closureFunc());