1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 23:57:59 +01:00

Assert mode.length == 1 in hints.addMode.

This commit is contained in:
Kris Maglione
2011-07-30 05:35:23 -04:00
parent 9f057a6f0d
commit 3d48c0d68b

View File

@@ -787,6 +787,7 @@ var Hints = Module("hints", {
* @optional * @optional
*/ */
addMode: function (mode, prompt, action, tags) { addMode: function (mode, prompt, action, tags) {
dactyl.assert(mode.length == 1);
arguments[1] = UTF8(prompt); arguments[1] = UTF8(prompt);
this.modes[mode] = Hints.Mode.apply(Hints.Mode, arguments); this.modes[mode] = Hints.Mode.apply(Hints.Mode, arguments);
}, },