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

This commit is contained in:
Torkel Ödegaard 2016-11-22 14:20:06 +01:00
parent 34790e1fab
commit 2a33594c02

View File

@ -106,7 +106,7 @@ export class VariableEditorCtrl {
};
$scope.duplicate = function(variable) {
var clone = _.cloneDeep(variable.getModel());
var clone = _.cloneDeep(variable.getSaveModel());
$scope.current = variableSrv.createVariableFromModel(clone);
$scope.variables.push($scope.current);
$scope.current.name = 'copy_of_'+variable.name;