diff options
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Angular.js b/src/Angular.js index 0f66d99c..c0da2174 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -598,16 +598,16 @@ function copy(source, destination){ /** * Create a shallow copy of an object - * @param src */ -function shallowCopy(src) { - var dst = {}, - key; - for(key in src) { - if (src.hasOwnProperty(key)) { +function shallowCopy(src, dst) { + dst = dst || {}; + + for(var key in src) { + if (src.hasOwnProperty(key) && key.substr(0, 2) !== '$$') { dst[key] = src[key]; } } + return dst; } |
