{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/immutable-js/issues/362","labels_url":"https://api.github.com/repos/facebook/immutable-js/issues/362/labels{/name}","comments_url":"https://api.github.com/repos/facebook/immutable-js/issues/362/comments","events_url":"https://api.github.com/repos/facebook/immutable-js/issues/362/events","html_url":"https://github.com/facebook/immutable-js/issues/362","id":59729062,"number":362,"title":"Comparison of 2 records that have `size` field that equals `undefined` fails with exception","user":{"login":"zerkms","id":302295,"avatar_url":"https://avatars.githubusercontent.com/u/302295?v=3","gravatar_id":"","url":"https://api.github.com/users/zerkms","html_url":"https://github.com/zerkms","followers_url":"https://api.github.com/users/zerkms/followers","following_url":"https://api.github.com/users/zerkms/following{/other_user}","gists_url":"https://api.github.com/users/zerkms/gists{/gist_id}","starred_url":"https://api.github.com/users/zerkms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerkms/subscriptions","organizations_url":"https://api.github.com/users/zerkms/orgs","repos_url":"https://api.github.com/users/zerkms/repos","events_url":"https://api.github.com/users/zerkms/events{/privacy}","received_events_url":"https://api.github.com/users/zerkms/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-04T00:08:08Z","updated_at":"2015-03-08T17:33:27Z","closed_at":"2015-03-08T17:33:27Z","body":"To reproduce just run:\r\n\r\n    const C = Immutable.Record({\r\n        size: undefined\r\n    });\r\n    \r\n    var a = new C({});\r\n    var b = new C({});\r\n    \r\n    Immutable.is(a, b);\r\n\r\nExpected: it must run well\r\n\r\nActual: it fails with `Uncaught TypeError: undefined is not a function` which points to this line: https://github.com/facebook/immutable-js/blob/master/dist/immutable.js#L3885\r\n\r\n    if (a.size === undefined) {\r\n      if (b.size === undefined) {\r\n        a.cacheResult(); // <--- this line\r\n      } else {\r\n        flipped = true;\r\n        var _ = a;\r\n        a = b;\r\n        b = _;\r\n      }\r\n    }"}}