From d2e4e499862aeca157dbe7a7422c465e7c79205e Mon Sep 17 00:00:00 2001 From: Thomas Belin Date: Tue, 7 Jan 2014 16:09:37 +0100 Subject: fix(ngResource): don't filter "$"-prefixed properties from ngResource requests/responses ngResource no longer filters properties prefixed with a single "$" character from requests or responses, correcting a regression introduced in 1.2.6 (cb29632a) which caused shallowCopy and shallowClearAndCopy to ignore properties prefixed with a single "$". Closes #5666 Closes #6080 Closes #6033 --- src/ngResource/resource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ngResource') diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index 055f0890..1ab31bf5 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -35,7 +35,7 @@ function shallowClearAndCopy(src, dst) { }); for (var key in src) { - if (src.hasOwnProperty(key) && key.charAt(0) !== '$' && key.charAt(1) !== '$') { + if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) { dst[key] = src[key]; } } -- cgit v1.2.3