Ensure browser is initialized properly before executing javascript

This commit is contained in:
Ylva Selling
2022-10-07 16:20:43 -04:00
parent 59209928e6
commit c710aa3a34
2 changed files with 3 additions and 2 deletions

View File

@@ -672,7 +672,8 @@ namespace {
SkyBrowserModule* module = global::moduleEngine->module<SkyBrowserModule>();
TargetBrowserPair* pair = module->pair(identifier);
if (pair) {
// Make sure the webpage has loaded properly before executing javascript on it
if (pair && pair->browser()->isInitialized()) {
pair->setBorderRadius(std::clamp(radius, 0.0, 1.0));
}
}