mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Extract local vars in Filter.canonicalize_tuple().
This can be squashed with the prior commit or subsequent commit, or it can just stand on its own, but it's part of transitioning to a functional change in the next commit. (imported from commit 155a0cdd28f851810fbedfef1a306e3190bf1c34)
This commit is contained in:
@@ -28,9 +28,14 @@ Filter.canonicalize_operator = function (operator) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Filter.canonicalize_tuple = function (tuple) {
|
Filter.canonicalize_tuple = function (tuple) {
|
||||||
|
var operator = tuple[0];
|
||||||
|
var operand = tuple[1];
|
||||||
|
|
||||||
|
operator = Filter.canonicalize_operator(operator);
|
||||||
|
operand = stream_data.canonicalized_name(operand);
|
||||||
|
|
||||||
// We may want to consider allowing mixed-case operators at some point
|
// We may want to consider allowing mixed-case operators at some point
|
||||||
return [Filter.canonicalize_operator(tuple[0]),
|
return [operator, operand];
|
||||||
stream_data.canonicalized_name(tuple[1])];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Filter.prototype = {
|
Filter.prototype = {
|
||||||
|
|||||||
Reference in New Issue
Block a user