V8: Mark the current variant as dirty when its name changes (#7004)

Whoop whoop! Thanks Kenn
This commit is contained in:
emma burstow
2020-01-30 10:27:39 +00:00
committed by GitHub

View File

@@ -58,9 +58,9 @@
/** Called when the component has linked all elements, this is when the form controller is available */
function postLink() {
//set the content to dirty if the header changes
unsubscribe.push($scope.$watch("contentHeaderForm.$dirty",
function(newValue, oldValue) {
if (newValue === true) {
unsubscribe.push($scope.$watch("vm.editor.content.name",
function (newValue, oldValue) {
if (newValue !== oldValue) {
vm.editor.content.isDirty = true;
}
}));