From 269f3670cde7ff1692cf0df75e05e439b80a9d02 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Mon, 19 Aug 2013 17:22:24 -0400 Subject: [PATCH] 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) --- static/js/filter.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/static/js/filter.js b/static/js/filter.js index e95e3a525a..73982646b9 100644 --- a/static/js/filter.js +++ b/static/js/filter.js @@ -28,9 +28,14 @@ Filter.canonicalize_operator = function (operator) { }; 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 - return [Filter.canonicalize_operator(tuple[0]), - stream_data.canonicalized_name(tuple[1])]; + return [operator, operand]; }; Filter.prototype = {