Merge pull request #32734 from woocommerce/fix/admin-type
Fix history type error
This commit is contained in:
commit
7b3ab3aeb1
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue