From b08e2be64c749da433d6c8a4e764f3c80c6f1e86 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Sat, 16 Oct 2010 16:18:41 +0100 Subject: Pass the toKeyValue() test - parsing flags --- src/Angular.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Angular.js') diff --git a/src/Angular.js b/src/Angular.js index 72f341f3..3be61673 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -398,8 +398,8 @@ function parseKeyValue(/**string*/keyValue) { function toKeyValue(obj) { var parts = []; - foreach(obj, function(value, key){ - parts.push(escape(key) + '=' + escape(value)); + foreach(obj, function(value, key) { + parts.push(escape(key) + (value === true ? '' : '=' + escape(value))); }); return parts.length ? parts.join('&') : ''; } -- cgit v1.2.3