Skip to content

Commit

Permalink
add check for matching the current content node id (#274)
Browse files Browse the repository at this point in the history
Co-authored-by: JosephHe <joseph@youritteam.com.au>
  • Loading branch information
josephheqj and JosephHe authored Jun 9, 2024
1 parent 6a23e74 commit 72aa329
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var vm = this;
vm.displays = [];
vm.defaultButtonScope = null;

vm.nodeId = "";
vm.setActive = setActive;

function setActive(display) {
Expand All @@ -21,8 +21,10 @@
}

function save() {
$scope.$broadcast("seoContentSubmitting");
notificationsService.success("SEO content saved!");
if(vm.nodeId === editorState.current.id){
$scope.$broadcast("seoContentSubmitting");
notificationsService.success("SEO content saved!");
}
}

function init() {
Expand All @@ -36,6 +38,8 @@
vm.displays[0].active = true;
}
});

vm.nodeId = editorState.current.id;
}

unsubscribe.push(eventsService.on("app.tabChange",
Expand Down

0 comments on commit 72aa329

Please sign in to comment.