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

FlowBuilder: Fix isLoading attribute in useWebviewContents #2973

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

asastre
Copy link
Contributor

@asastre asastre commented Jan 28, 2025

Description

Remove the isLoading state variable in the useWebviewContents hook and return it as the length of the fetched contents so if the contents object has no keys, it means that the contents are still loading.

Context

After the migration from React 16 to React 18 the useWebviewContents hook was not working as expected because the isLoading variable was being set to false before the contents variable was set in the state so the webview was trying to access to an empty contents object.

Testing

The pull request has no tests.

@asastre asastre merged commit cd78844 into master-lts Jan 29, 2025
4 checks passed
@asastre asastre deleted the flow-builder/fix-is-loading branch January 29, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants