Bug 1509610 - Set default value for optional openParams parameter. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D12812

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dão Gottwald 2018-11-26 10:58:54 +00:00
parent 4f21425ae7
commit 71cf7e0ea1

View File

@ -189,7 +189,7 @@ class UrlbarInput {
* @param {object} [triggeringPrincipal]
* The principal that the action was triggered from.
*/
handleCommand(event, openWhere, openParams, triggeringPrincipal) {
handleCommand(event, openWhere, openParams = {}, triggeringPrincipal = null) {
let isMouseEvent = event instanceof this.window.MouseEvent;
if (isMouseEvent && event.button == 2) {
// Do nothing for right clicks.