diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Angular.js | 2 | ||||
| -rw-r--r-- | src/ngResource/resource.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Angular.js b/src/Angular.js index 21ce1ff7..8e315fb7 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -772,7 +772,7 @@ function shallowCopy(src, dst) { for(var key in src) { // shallowCopy is only ever called by $compile nodeLinkFn, which has control over src // so we don't need to worry about using our custom hasOwnProperty here - if (src.hasOwnProperty(key) && key.charAt(0) !== '$' && key.charAt(1) !== '$') { + if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) { dst[key] = src[key]; } } 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]; } } |
