Skip to content
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

Some cleanups to web3Enable (god-function) #507

Merged
merged 4 commits into from
Oct 18, 2020
Merged

Conversation

jacogr
Copy link
Member

@jacogr jacogr commented Oct 18, 2020

Better... not great.

@@ -3,12 +3,10 @@

export function documentReadyPromise <T> (creator: () => Promise<T>): Promise<T> {
return new Promise((resolve): void => {
if (['complete', 'interactive'].includes(document.readyState)) {
if (document.readyState === 'complete') {
Copy link
Member Author

@jacogr jacogr Oct 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been giving me endless issues in apps - sometimes ready, sometimes not. With only complete it seems consistent.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment, it makes this PR digestible :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still having some issues atm... it is much better, but it still missing initializations on some refreshes.

@jacogr jacogr merged commit d523d21 into master Oct 18, 2020
@jacogr jacogr deleted the jg-split-retrieval branch October 18, 2020 08:21
@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jun 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants