File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable no-use-before-define, react/no-multi-comp, no-underscore-dangle */
22import React from 'react'
3- import * as ReactIs from 'react-is'
43import hoistNonReactStatics from 'hoist-non-react-statics'
54import { invariant } from './util'
65import Context from './Context'
@@ -77,11 +76,12 @@ function createLoadable({
7776 ? options . resolveComponent ( module , props )
7877 : defaultResolveComponent ( module )
7978
80- if ( options . resolveComponent && ! ReactIs . isValidElementType ( Component ) ) {
81- throw new Error (
82- `resolveComponent returned something that is not a React component!` ,
83- )
84- }
79+ // FIXME: suppressed due to https://github.com/gregberge/loadable-components/issues/990
80+ // if (options.resolveComponent && !ReactIs.isValidElementType(Component)) {
81+ // throw new Error(
82+ // `resolveComponent returned something that is not a React component!`,
83+ // )
84+ // }
8585 hoistNonReactStatics ( Loadable , Component , {
8686 preload : true ,
8787 } )
Original file line number Diff line number Diff line change @@ -69,8 +69,7 @@ describe('#loadable', () => {
6969 } )
7070
7171 afterEach ( ( ) => {
72- // eslint-disable-next-line no-console
73- console . error . mockRestore ( )
72+ jest . restoreAllMocks ( ) ;
7473 } )
7574
7675 it ( 'renders nothing without a fallback' , ( ) => {
You can’t perform that action at this time.
0 commit comments