From 4afe237a32c366d7668113598e26db4a3fea8797 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 25 Sep 2010 15:06:06 -0400 Subject: [PATCH] Fix :map when there are user-defined mappings created in JavaScript. --- common/content/mappings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/content/mappings.js b/common/content/mappings.js index c12596f0..cc531756 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -180,8 +180,8 @@ const Mappings = Module("mappings", { _mappingsIterator: function (modes, stack) { modes = modes.slice(); return (map for ([i, map] in Iterator(stack[modes.shift()].sort(function (m1, m2) String.localeCompare(m1.name, m2.name)))) - if (modes.every(function (mode) stack[mode]. - some(function (m) array.equals(m.rhs, map.rhs) && m.name == map.name)))) + if (map.rhs && modes.every(function (mode) stack[mode]. + some(function (m) m.rhs && array.equals(m.rhs, map.rhs) && m.name == map.name)))) }, // NOTE: just normal mode for now