diff --git a/scripts/core/interactive-article-actions-panel/actions/publish-tab.tsx b/scripts/core/interactive-article-actions-panel/actions/publish-tab.tsx index 8dbc05e131..172c8190fa 100644 --- a/scripts/core/interactive-article-actions-panel/actions/publish-tab.tsx +++ b/scripts/core/interactive-article-actions-panel/actions/publish-tab.tsx @@ -51,7 +51,7 @@ export class WithPublishTab extends React.PureComponent { 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 ?? [], diff --git a/scripts/core/interactive-article-actions-panel/utils/get-initial-destination.ts b/scripts/core/interactive-article-actions-panel/utils/get-initial-destination.ts index 75b25c12a8..da38803820 100644 --- a/scripts/core/interactive-article-actions-panel/utils/get-initial-destination.ts +++ b/scripts/core/interactive-article-actions-panel/utils/get-initial-destination.ts @@ -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, }; }