aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Angular.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 8c322460..b438270c 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -758,7 +758,7 @@ function bind(self, fn) {
function toJsonReplacer(key, value) {
var val = value;
- if (/^\$+/.test(key)) {
+ if (typeof key === 'string' && key.charAt(0) === '$') {
val = undefined;
} else if (isWindow(value)) {
val = '$WINDOW';