From 7dc2d218a352f9777013cd84c8b3c556644dbc2e Mon Sep 17 00:00:00 2001 From: futpib Date: Fri, 30 Aug 2019 14:37:43 +0300 Subject: [PATCH] Fix legacy context error --- components/modals/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/modals/index.js b/components/modals/index.js index 8805643..4392ba8 100644 --- a/components/modals/index.js +++ b/components/modals/index.js @@ -118,7 +118,7 @@ class Modals extends React.PureComponent { }); }, { unloadModuleByIndex(index) { - const pai = getPaiByTypeAndIndex('module', index)(this.context.store.getState()); + const pai = getPaiByTypeAndIndex('module', index)(this.props.store.getState()); if (pai && path([ pai.name, 'confirmUnload' ], modules)) { return pai; @@ -202,10 +202,6 @@ class Modals extends React.PureComponent { } } -Modals.contextTypes = { - store: PropTypes.any, -}; - module.exports = compose( connect( state => ({