fix: make menu.popup options optional (#13977)

* add empty object as default param for options

* update docs

* add spec for optional options

* fix: add null check for options
This commit is contained in:
Dominic 2018-08-08 15:38:52 -07:00 committed by Charles Kerr
parent fc4499ebd4
commit a7052efaf4
3 changed files with 9 additions and 3 deletions

View file

@ -47,7 +47,7 @@ Menu.prototype._init = function () {
this.delegate = delegate
}
Menu.prototype.popup = function (options) {
Menu.prototype.popup = function (options = {}) {
if (options == null || typeof options !== 'object') {
throw new TypeError('Options must be an object')
}