File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -87,14 +87,7 @@ export default class Voyager extends React.Component<VoyagerProps> {
8787 return ;
8888 }
8989
90- let promise = this . props . introspection ( getIntrospectionQuery ( ) ) ;
91-
92- if ( ! isPromise ( promise ) ) {
93- throw new Error (
94- 'SchemaProvider did not return a Promise for introspection.' ,
95- ) ;
96- }
97-
90+ const promise = this . props . introspection ( getIntrospectionQuery ( ) ) ;
9891 this . setState ( {
9992 introspectionData : null ,
10093 schema : null ,
@@ -249,8 +242,3 @@ export default class Voyager extends React.Component<VoyagerProps> {
249242 return props . children || null ;
250243 } ;
251244}
252-
253- // Duck-type promise detection.
254- function isPromise ( value ) {
255- return typeof value === 'object' && typeof value . then === 'function' ;
256- }
You can’t perform that action at this time.
0 commit comments