You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Following #7618 it is now possible to use objects which contains circular references (thanks for adding this). This test uses the Jasmine object equality check to verify that the copy of an object that contains circular references has indeed worked.
However, two such objects should also be angular.equals. Currently, this is not possible as the stack explodes:
it('should handle circular references when circularRefs is turned on',function(){vara={b: {a: null},self: null,selfs: [null,null,[null]]};a.b.a=a;a.self=a;a.selfs=[a,a.b,[a]];varaCopy=copy(a,null);expect(aCopy).toEqual(a);expect(equals(a,aCopy)).toBeTruthy();// ** EXPLODES **});
A fix similar to this does the job. Let me know if you want me to formulate a PR for this.