From 2ff94f538819ae61fcd5e1ba31d859b995725a6e Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Fri, 22 Apr 2022 16:47:31 +0800 Subject: [PATCH] Fix history type error --- .../client/two-column-tasks/sectioned-task-list.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/woocommerce-admin/client/two-column-tasks/sectioned-task-list.tsx b/plugins/woocommerce-admin/client/two-column-tasks/sectioned-task-list.tsx index 17f87f49a6d..e00a78c8e2c 100644 --- a/plugins/woocommerce-admin/client/two-column-tasks/sectioned-task-list.tsx +++ b/plugins/woocommerce-admin/client/two-column-tasks/sectioned-task-list.tsx @@ -20,6 +20,7 @@ import { import { recordEvent } from '@woocommerce/tracks'; import { List, TaskItem } from '@woocommerce/experimental'; import classnames from 'classnames'; +import { History } from 'history'; /** * Internal dependencies @@ -138,7 +139,9 @@ export const SectionedTaskList: React.FC< TaskListProps > = ( { if ( task.actionUrl.startsWith( 'http' ) ) { window.location.href = task.actionUrl; } else { - getHistory().push( getNewPath( {}, task.actionUrl, {} ) ); + ( getHistory() as History ).push( + getNewPath( {}, task.actionUrl, {} ) + ); } return; }