diff --git a/shell/browser/api/electron_api_base_window.cc b/shell/browser/api/electron_api_base_window.cc index 6bbc442cce..03c20ee0e7 100644 --- a/shell/browser/api/electron_api_base_window.cc +++ b/shell/browser/api/electron_api_base_window.cc @@ -854,10 +854,10 @@ void BaseWindow::SetVisibleOnAllWorkspaces(bool visible, gin_helper::Dictionary options; bool visibleOnFullScreen = false; bool skipTransformProcessType = false; - args->GetNext(&options) && - options.Get("visibleOnFullScreen", &visibleOnFullScreen); - args->GetNext(&options) && - options.Get("skipTransformProcessType", &skipTransformProcessType); + if (args->GetNext(&options)) { + options.Get("visibleOnFullScreen", &visibleOnFullScreen); + options.Get("skipTransformProcessType", &skipTransformProcessType); + } return window_->SetVisibleOnAllWorkspaces(visible, visibleOnFullScreen, skipTransformProcessType); }