Skip to content

Commit 23ce4a2

Browse files
github-actions[bot]gonpombo8aixaCode
authored
chore: sync main to dev (#6142)
fix: global px (#6134) wait for user interaction to run global px Co-authored-by: Gon Pombo <gonzalo@decentraland.org> Co-authored-by: Aga <aga@besz.me>
1 parent 43280fb commit 23ce4a2

File tree

1 file changed

+7
-2
lines changed
  • browser-interface/packages/shared/portableExperiences

1 file changed

+7
-2
lines changed

browser-interface/packages/shared/portableExperiences/sagas.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
UPDATE_ENGINE_PX
2929
} from './actions'
3030
import { getDesiredPortableExperiences } from './selectors'
31+
import { browserInterface } from '../../unity-interface/BrowserInterface'
3132

3233
export function* portableExperienceSaga(): any {
3334
// List the actions that might trigger a portable experience change
@@ -56,9 +57,10 @@ export function* portableExperienceSaga(): any {
5657
}
5758

5859
export function* fetchInitialPortableExperiences() {
59-
yield waitForMetaConfigurationInitialization()
60+
yield call(waitForMetaConfigurationInitialization)
6061

61-
yield waitForAvatarSceneInitialized()
62+
yield call(waitForAvatarSceneInitialized)
63+
yield call(waitForRendererRpcConnection)
6264

6365
const qs = new URLSearchParams(globalThis.location.search)
6466
const globalPortableExperiences: string[] = qs.has('GLOBAL_PX')
@@ -69,6 +71,9 @@ export function* fetchInitialPortableExperiences() {
6971
for (const id of globalPortableExperiences) {
7072
try {
7173
const px: LoadableScene = yield call(getPortableExperienceFromUrn, id)
74+
75+
yield browserInterface.onUserInteraction
76+
7277
yield put(addKernelPortableExperience(px))
7378
} catch (err: any) {
7479
console.error(err)

0 commit comments

Comments
 (0)