diff --git a/common/content/tabs.js b/common/content/tabs.js index 8802e1b6..2b4ebae0 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -595,12 +595,12 @@ function Tabs() //{{{ "Undo closing of a tab", function (args) { - let count = args.count; - args = args[0]; - - if (count < 1) - count = 1; + if (args.length) + args = args[0]; + else + args = Math.max(args.count, 0); + let m; if (m = /^(\d+)(:|$)/.exec(args || '1')) window.undoCloseTab(Number(m[1]) - 1); else if (args)