mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-29 05:15:38 +08:00
fix(angular.toJson): only strip properties beginning with $$, not $
BREAKING CHANGE: If you expected `toJson` to strip these types of properties before, you will have to manually do this yourself now.
This commit is contained in:
@@ -1131,8 +1131,13 @@ describe('angular', function() {
|
||||
});
|
||||
|
||||
|
||||
it('should not serialize properties starting with $', function() {
|
||||
expect(toJson({$few: 'v', $$some:'value'}, false)).toEqual('{}');
|
||||
it('should not serialize properties starting with $$', function() {
|
||||
expect(toJson({$$some:'value'}, false)).toEqual('{}');
|
||||
});
|
||||
|
||||
|
||||
it('should serialize properties starting with $', function() {
|
||||
expect(toJson({$few: 'v'}, false)).toEqual('{"$few":"v"}');
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user