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:
parent
fc4499ebd4
commit
a7052efaf4
3 changed files with 9 additions and 3 deletions
|
@ -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')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue