File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -101,14 +101,16 @@ export interface IEvents {
101
101
}
102
102
}
103
103
104
+ // Remove this once new components/observables reaches production.
105
+ const __OBSERVABLES_FALLBACK_SUPPORT = true
104
106
/**
105
107
* @internal
106
108
* This function generates a callback that is passed to the Observable
107
109
* constructor to subscribe to the events of the DecentralandInterface
108
110
*/
109
111
function createSubscriber ( eventName : keyof IEvents ) {
110
112
return ( ) => {
111
- if ( eventName === 'comms' || ( globalThis as any ) . __OBSERVABLES_FALLBACK_SUPPORT ) {
113
+ if ( eventName === 'comms' || __OBSERVABLES_FALLBACK_SUPPORT ) {
112
114
subscribe ( { eventId : eventName } ) . catch ( console . error )
113
115
} else {
114
116
SDK7ComponentsObservable ?. subscribe ( eventName )
@@ -263,7 +265,7 @@ export async function pollEvents(sendBatch: (body: ManyEntityAction) => Promise<
263
265
264
266
const SDK7ComponentsObservable = processObservables ( )
265
267
function processObservables ( ) {
266
- if ( ( globalThis as any ) . __OBSERVABLES_FALLBACK_SUPPORT ) return
268
+ if ( __OBSERVABLES_FALLBACK_SUPPORT ) return
267
269
const subscriptions = new Set < keyof IEvents > ( )
268
270
269
271
function subscribe ( eventName : keyof IEvents ) {
You can’t perform that action at this time.
0 commit comments