mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
Allow Filter to accept non-tuple-based terms.
We make this happen inside of canonicalize_term. (imported from commit 0571f6cac8ffdc806af56423cc98134c7493139e)
This commit is contained in:
@@ -145,9 +145,10 @@ Filter.canonicalize_operator = function (operator) {
|
||||
}
|
||||
};
|
||||
|
||||
Filter.canonicalize_term = function (tuple) {
|
||||
var operator = tuple[0];
|
||||
var operand = tuple[1];
|
||||
Filter.canonicalize_term = function (opts) {
|
||||
// Legacy code may still call use with a tuple of [operator, operand].
|
||||
var operator = opts.operator || opts[0];
|
||||
var operand = opts.operand || opts[1];
|
||||
|
||||
operator = Filter.canonicalize_operator(operator);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user