Skip to content

Commit

Permalink
Originating desk not selected in the publishing dialog (#4637)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonidoo authored Sep 13, 2024
1 parent 20f1206 commit 01cef53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class WithPublishTab extends React.PureComponent<IProps, IState> {

this.state = {
...getInitialPublishingDateOptions([this.props.item]),
selectedDestination: getCurrentDeskDestination(),
selectedDestination: getCurrentDeskDestination(this.props.item.task.desk),
publishingDateOptions: getInitialPublishingDateOptions([props.item]),
publishingTarget: {
target_subscribers: this.props.item.target_subscribers ?? [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@ export function getInitialDestination(
return destination;
}

export function getCurrentDeskDestination(): ISendToDestination {
let destinationDesk: string = sdApi.desks.getCurrentDeskId();

export function getCurrentDeskDestination(id?: string): ISendToDestination {
return {
type: 'desk',
desk: destinationDesk,
desk: id ?? sdApi.desks.getCurrentDeskId(),
stage: null,
};
}

0 comments on commit 01cef53

Please sign in to comment.