-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: loading of session form in wizard step 5 #5843
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/md4coig2e |
Codecov Report
@@ Coverage Diff @@
## development #5843 +/- ##
===============================================
- Coverage 23.46% 23.42% -0.04%
===============================================
Files 512 512
Lines 5460 5469 +9
Branches 63 65 +2
===============================================
Hits 1281 1281
- Misses 4163 4171 +8
- Partials 16 17 +1
Continue to review full report at Codecov.
|
data.event | ||
.get('speakersCall') | ||
.then(relationshipRecord => { | ||
resolve(relationshipRecord); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This then call is redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after removing then, the session page isn't loading
@@ -14,7 +14,19 @@ export default class SessionsSpeakersRoute extends Route.extend(EventWizardMixin | |||
const tracksPromise = data.event.get('tracks'); | |||
const microlocationsPromise = data.event.get('microlocations'); | |||
const sessionTypesPromise = data.event.get('sessionTypes'); | |||
const speakersCallPromise = this.getOrCreate(data.event, 'speakersCall', 'speakers-call'); | |||
const speakersCallPromise = new RSVP.Promise(resolve => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please move this to an async function, and use await in that function?
@@ -14,7 +14,19 @@ export default class SessionsSpeakersRoute extends Route.extend(EventWizardMixin | |||
const tracksPromise = data.event.get('tracks'); | |||
const microlocationsPromise = data.event.get('microlocations'); | |||
const sessionTypesPromise = data.event.get('sessionTypes'); | |||
const speakersCallPromise = this.getOrCreate(data.event, 'speakersCall', 'speakers-call'); | |||
const speakersCallPromise = new RSVP.Promise(async resolve => { | |||
await data.event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't await here, it's useless and will block the loading. Move these statements in another function and await in that function. No await should be there in model function
This pull request introduces 1 alert when merging 8da2dab into f17e24c - view on LGTM.com new alerts:
|
Working for me, but the issue did not appear all the time, just from time to time. We need to test this a while. So, I think this can be merged then. |
Fixes #5768
Checklist
development
branch.