Commit 2a33594c by Torkel Ödegaard

fix(templating): fixed duplicate button bug, fixes #6652

parent 34790e1f
...@@ -106,7 +106,7 @@ export class VariableEditorCtrl { ...@@ -106,7 +106,7 @@ export class VariableEditorCtrl {
}; };
$scope.duplicate = function(variable) { $scope.duplicate = function(variable) {
var clone = _.cloneDeep(variable.getModel()); var clone = _.cloneDeep(variable.getSaveModel());
$scope.current = variableSrv.createVariableFromModel(clone); $scope.current = variableSrv.createVariableFromModel(clone);
$scope.variables.push($scope.current); $scope.variables.push($scope.current);
$scope.current.name = 'copy_of_'+variable.name; $scope.current.name = 'copy_of_'+variable.name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment