Skip to content

Commit ce8b0bd

Browse files
committed
fixup! nw2: Fix Win.zoomLevel
1 parent 2e59a88 commit ce8b0bd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/api/nw_window_api.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,8 @@ NwCurrentWindowInternalReloadIgnoringCacheFunction::Run() {
721721

722722
bool NwCurrentWindowInternalGetZoomFunction::RunNWSync(base::ListValue* response, std::string* error) {
723723
content::WebContents* web_contents = GetSenderWebContents();
724-
if (args_->GetSize() > 0) {
724+
if (base::FeatureList::IsEnabled(::features::kNWNewWin) &&
725+
args_->GetSize() > 0) {
725726
int id = 0;
726727
args_->GetInteger(0, &id);
727728
Browser* browser = getBrowser(this, id);
@@ -744,7 +745,8 @@ bool NwCurrentWindowInternalSetZoomFunction::RunNWSync(base::ListValue* response
744745

745746
EXTENSION_FUNCTION_VALIDATE(args_->GetDouble(0, &zoom_level));
746747
content::WebContents* web_contents = GetSenderWebContents();
747-
if (args_->GetSize() > 1) {
748+
if (base::FeatureList::IsEnabled(::features::kNWNewWin) &&
749+
args_->GetSize() > 1) {
748750
int id = 0;
749751
args_->GetInteger(1, &id);
750752
Browser* browser = getBrowser(this, id);

0 commit comments

Comments
 (0)