-
Notifications
You must be signed in to change notification settings - Fork 58
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
refactor: chunk multi-message rendering to prevent singular long task #939
refactor: chunk multi-message rendering to prevent singular long task #939
Conversation
if (err.message === 'offer_validation_error') { | ||
return undefined; | ||
if (mapIndex === 0) { | ||
return renderOrUpdateMessage(); |
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.
We can remove the consistent-return
eslint warning by updating this slightly
return renderOrUpdateMessage(); | |
renderOrUpdateMessage(); | |
return; |
/* eslint-disable-next-line promise/no-native, compat/compat */ | ||
Promise.all( | ||
validContainers.map((container, mapIndex) => { | ||
/* eslint-disable-next-line promise/no-native, compat/compat, consistent-return */ | ||
return new Promise((resolve, reject) => { |
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.
Based on the previous comment we can't make this change?
/* eslint-disable-next-line promise/no-native, compat/compat */ | |
Promise.all( | |
validContainers.map((container, mapIndex) => { | |
/* eslint-disable-next-line promise/no-native, compat/compat, consistent-return */ | |
return new Promise((resolve, reject) => { | |
ZalgoPromise.all( | |
validContainers.map((container, mapIndex) => { | |
return new ZalgoPromise((resolve, reject) => { |
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.
When I removed the promises for zalgopromise I forgot to add back the new ZalgoPromise((resolve, reject) portion. Thats why I couldn't get it to return
🎉 This PR is included in version 1.43.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
## [1.43.0](v1.42.0...v1.43.0) (2023-06-14) ### Features * Update UK Pi3 Legal Disclosure (DTCRCMERC-2267) ([#936](#936)) ([a186771](a186771)) ### Bug Fixes * add cookie global ([#951](#951)) ([a12ebb3](a12ebb3)) ### Build System * remove old stage bundle url ([#947](#947)) ([c669016](c669016)) ### Continuous Integration * Github action workflow npm publish ([#923](#923)) ([0e38156](0e38156)) * remove use of deprecated set-output command ([#938](#938)) ([9ef6eb0](9ef6eb0)) ### Code Refactoring * chunk multi-message rendering to prevent singular long task ([#939](#939)) ([9b1a240](9b1a240)) * remove NE from US Pay Monthly modal legal disclosure ([#906](#906)) ([eb9ffb0](eb9ffb0))
Break up the long running tasks