Skip to content

Commit

Permalink
retain backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jan 31, 2019
1 parent 3efd836 commit d9f1170
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions atom/browser/api/atom_api_top_level_window.cc
Expand Up @@ -650,6 +650,9 @@ void TopLevelWindow::SetMenu(v8::Isolate* isolate, v8::Local<v8::Value> value) {
mate::ConvertFromV8(isolate, value, &menu) && !menu.IsEmpty()) {
menu_.Reset(isolate, menu.ToV8());
window_->SetMenu(menu->model());
} else if (value->IsNull()) {
menu_.Reset();
window_->SetMenu(nullptr);
} else {
isolate->ThrowException(
v8::Exception::TypeError(mate::StringToV8(isolate, "Invalid Menu")));
Expand Down

0 comments on commit d9f1170

Please sign in to comment.