mirror of https://github.com/zulip/zulip.git
Use operator/operand in narrow.collect_single().
(This is part of converting away from tuples.) (imported from commit ba3083f8b3242fee1d532d7666aee68af89d8ddc)
This commit is contained in:
parent
796ebfd007
commit
15b0f9dcc7
|
@ -49,11 +49,11 @@ function collect_single(operators) {
|
||||||
var seen = new Dict();
|
var seen = new Dict();
|
||||||
var result = new Dict();
|
var result = new Dict();
|
||||||
_.each(operators, function (elem) {
|
_.each(operators, function (elem) {
|
||||||
var key = elem[0];
|
var key = elem.operator;
|
||||||
if (seen.has(key)) {
|
if (seen.has(key)) {
|
||||||
result.del(key);
|
result.del(key);
|
||||||
} else {
|
} else {
|
||||||
result.set(key, elem[1]);
|
result.set(key, elem.operand);
|
||||||
seen.set(key, true);
|
seen.set(key, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue