File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/app/src/app/overmind/dependencies Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,11 @@ export const graphql: <T extends Queries>(
202202
203203 subscription . dispose = ( ) => {
204204 _subscriptions [ queryString ] . forEach ( sub => {
205- sub . dispose ( ) ;
205+ try {
206+ sub . dispose ( ) ;
207+ } catch ( e ) {
208+ // Ignore, it probably throws an error because we weren't subscribed in the first place
209+ }
206210 } ) ;
207211 _subscriptions [ queryString ] . length = 0 ;
208212 } ;
@@ -212,6 +216,11 @@ export const graphql: <T extends Queries>(
212216 Subscription [ ]
213217 > ( ( subAggr , sub ) => {
214218 if ( cb ( sub . variables ) ) {
219+ try {
220+ sub . dispose ( ) ;
221+ } catch ( e ) {
222+ // Ignore, it probably throws an error because we weren't subscribed in the first place
223+ }
215224 return subAggr ;
216225 }
217226 return subAggr . concat ( sub ) ;
You can’t perform that action at this time.
0 commit comments