diff --git a/scripts/api/article.ts b/scripts/api/article.ts index e3f4907485..6ab5125689 100644 --- a/scripts/api/article.ts +++ b/scripts/api/article.ts @@ -15,7 +15,7 @@ import {IPublishingDateOptions} from 'core/interactive-article-actions-panel/sub import {notify} from 'core/notify/notify'; import ng from 'core/services/ng'; import {gettext} from 'core/utils'; -import {flatMap, keys, pick, trim, union} from 'lodash'; +import {flatMap, keys, pick, trim} from 'lodash'; import {IArticle, IDangerousArticlePatchingOptions, IDesk, IStage, onPublishMiddlewareResult} from 'superdesk-api'; import {duplicateItems} from './article-duplicate'; import {fetchItems, fetchItemsToCurrentDesk} from './article-fetch'; @@ -426,7 +426,10 @@ function edit( function getItemPatchWithKillOrTakedownTemplate(item: IArticle, action: IArticleAction): Promise { const itemForTemplate = { template_name: action, - item: pick(item, union(keys(CONTENT_FIELDS_DEFAULTS), ['_id', 'versioncreated', 'task'])), + item: pick( + item, + [...(keys(CONTENT_FIELDS_DEFAULTS)), '_id', 'versioncreated', 'task'], + ), }; return httpRequestJsonLocal({ @@ -436,7 +439,7 @@ function getItemPatchWithKillOrTakedownTemplate(item: IArticle, action: IArticle }).then((result: IArticle) => { return { ...result, - ...(action === 'kill' && {operation: 'kill'}), + ...(action === 'kill' ? {operation: 'kill'} : {}), state: ITEM_STATE.PUBLISHED, }; }); diff --git a/scripts/apps/authoring-react/authoring-angular-integration.tsx b/scripts/apps/authoring-react/authoring-angular-integration.tsx index e3dc134012..a1cd58f443 100644 --- a/scripts/apps/authoring-react/authoring-angular-integration.tsx +++ b/scripts/apps/authoring-react/authoring-angular-integration.tsx @@ -210,7 +210,7 @@ function getInlineToolbarActions( priority: 0.1, component: () => (