From 70ba1629a07fe986abc81f10d1b6a339dec28ca2 Mon Sep 17 00:00:00 2001 From: wangqianliang Date: Fri, 22 Feb 2019 10:52:37 +0800 Subject: [PATCH] fix(code/frontend): fix componentWillMount --- x-pack/plugins/code/public/components/route.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/x-pack/plugins/code/public/components/route.ts b/x-pack/plugins/code/public/components/route.ts index f949fe707a1e9..275f8cee4ac80 100644 --- a/x-pack/plugins/code/public/components/route.ts +++ b/x-pack/plugins/code/public/components/route.ts @@ -12,9 +12,7 @@ interface Props extends RouteProps { routeChange: (match: Match) => void; } class CSRoute extends ReactRoute { - public componentWillMount() { - // @ts-ignore - super.componentWillMount(); + public UNSAFE_componentWillMount() { this.props.routeChange({ ...this.state.match, location: this.props.location }); }