tslint: tslint to const fixes part3 (#13036)

This commit is contained in:
Torkel Ödegaard
2018-08-26 21:52:57 +02:00
committed by GitHub
parent 35c00891e7
commit e1beaaa0f7
56 changed files with 359 additions and 363 deletions

View File

@@ -64,7 +64,7 @@ export class VariableEditorCtrl {
return false;
}
var sameName = _.find($scope.variables, { name: $scope.current.name });
const sameName = _.find($scope.variables, { name: $scope.current.name });
if (sameName && sameName !== $scope.current) {
appEvents.emit('alert-warning', ['Validation', 'Variable with the same name already exists']);
return false;
@@ -114,7 +114,7 @@ export class VariableEditorCtrl {
};
$scope.duplicate = function(variable) {
var clone = _.cloneDeep(variable.getSaveModel());
const clone = _.cloneDeep(variable.getSaveModel());
$scope.current = variableSrv.createVariableFromModel(clone);
$scope.current.name = 'copy_of_' + variable.name;
variableSrv.addVariable($scope.current);
@@ -148,7 +148,7 @@ export class VariableEditorCtrl {
};
$scope.typeChanged = function() {
var old = $scope.current;
const old = $scope.current;
$scope.current = variableSrv.createVariableFromModel({
type: $scope.current.type,
});
@@ -156,7 +156,7 @@ export class VariableEditorCtrl {
$scope.current.hide = old.hide;
$scope.current.label = old.label;
var oldIndex = _.indexOf(this.variables, old);
const oldIndex = _.indexOf(this.variables, old);
if (oldIndex !== -1) {
this.variables[oldIndex] = $scope.current;
}