Skip to content

Commit

Permalink
fix: Wait for frontend compilation before Flow client init
Browse files Browse the repository at this point in the history
Waits for frontend compilation before waiting for Flow client initialisation to cover the custom dev bundle compilation case.

Fixes #1705
  • Loading branch information
mshabarov committed Dec 11, 2023
1 parent 06271bd commit 7b7b893
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ private static Logger getLogger() {
private boolean autoScrollIntoView = true;
// @formatter:off
String WAIT_FOR_VAADIN_SCRIPT =
"if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {"
"if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.devServerIsNotLoaded) {"
+ " return false;"
+ "} else if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {"
+ " var clients = window.Vaadin.Flow.clients;"
+ " for (var client in clients) {"
+ " if (clients[client].isActive()) {"
+ " return false;"
+ " }"
+ " }"
+ " return true;"
+ "} else if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.devServerIsNotLoaded) {"
+ " return false;"
+ "} else {"
+ " return true;"
+ "}";
Expand Down

0 comments on commit 7b7b893

Please sign in to comment.