From f81908711b3cbbf149140b8360960a10189b53d5 Mon Sep 17 00:00:00 2001 From: gellert Date: Wed, 21 Dec 2016 23:15:05 +0100 Subject: [PATCH] use only one if statement --- atom/browser/api/atom_api_window.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 985bc563cb..49ebe464c3 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -92,11 +92,9 @@ Window::Window(v8::Isolate* isolate, v8::Local wrapper, // Offscreen windows are always created frameless. bool offscreen; - if (web_preferences.Get("offscreen", &offscreen)) { - if (offscreen) { - auto window_options = const_cast(options); - window_options.Set(options::kFrame, false); - } + if (web_preferences.Get("offscreen", &offscreen) && offscreen) { + auto window_options = const_cast(options); + window_options.Set(options::kFrame, false); } // Creates the WebContents used by BrowserWindow.