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> {
87
87
return ;
88
88
}
89
89
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 ( ) ) ;
98
91
this . setState ( {
99
92
introspectionData : null ,
100
93
schema : null ,
@@ -249,8 +242,3 @@ export default class Voyager extends React.Component<VoyagerProps> {
249
242
return props . children || null ;
250
243
} ;
251
244
}
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