Skip to content

Commit

Permalink
fix lint issue, dont wipe extra on update
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkLark86 committed Oct 12, 2023
1 parent 44447e8 commit e06dbf0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,13 @@ export function ArticleEditDirective(

// Needed only for authoring Angular. In authoring react we have a generic
// event ('resource:updated') which listens to all item changes.
scope.$on('author_approval:updated', (_, extra) => {
scope.$on('author_approval:updated', (_event, extra) => {
if (extra.item_id === scope.item?._id) {
scope.item.extra = {publish_sign_off: extra.new_sign_off};
if (scope.item.extra == null) {
scope.item.extra = {};
}

scope.item.extra.publish_sign_off = extra.new_sign_off;
scope.$apply();
}
});
Expand Down

0 comments on commit e06dbf0

Please sign in to comment.