{"action":"created","issue":{"url":"https://api.github.com/repos/rtfeldman/seamless-immutable/issues/76","labels_url":"https://api.github.com/repos/rtfeldman/seamless-immutable/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/rtfeldman/seamless-immutable/issues/76/comments","events_url":"https://api.github.com/repos/rtfeldman/seamless-immutable/issues/76/events","html_url":"https://github.com/rtfeldman/seamless-immutable/issues/76","id":114774834,"number":76,"title":"Incompatible with Object.create(null)","user":{"login":"lzrski","id":1684495,"avatar_url":"https://avatars.githubusercontent.com/u/1684495?v=3","gravatar_id":"","url":"https://api.github.com/users/lzrski","html_url":"https://github.com/lzrski","followers_url":"https://api.github.com/users/lzrski/followers","following_url":"https://api.github.com/users/lzrski/following{/other_user}","gists_url":"https://api.github.com/users/lzrski/gists{/gist_id}","starred_url":"https://api.github.com/users/lzrski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzrski/subscriptions","organizations_url":"https://api.github.com/users/lzrski/orgs","repos_url":"https://api.github.com/users/lzrski/repos","events_url":"https://api.github.com/users/lzrski/events{/privacy}","received_events_url":"https://api.github.com/users/lzrski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-03T09:25:31Z","updated_at":"2015-11-07T19:59:48Z","closed_at":null,"body":"Hello. Thanks for seamless. It's a very nice piece of software.\r\n\r\nI was surprised however that I cannot create immutable object from an object without prototype (e.g. acquired with `Object.create(null)`:\r\n\r\n```javascript\r\nImmutable(Object.create(null));\r\n// TypeError: target.hasOwnProperty is not a function\r\n```\r\n\r\nIt is also impossible to merge such an object into `immutable`:\r\n\r\n```javascript\r\nvar o1 = Immutable({a: 1});\r\nvar o2 = Object.create(null);\r\no2.b = 2;\r\no1.merge(o2);\r\n// TypeError: other.hasOwnProperty is not a function\r\n```\r\n\r\nObviously it depends on `hasOwnProperty` method of the original object, which is usually available in a prototype chain.\r\n\r\nCan we use global `Object` methods instead, like `Object.getOwnPropertyDescriptor`? I'll be happy to provide PR, but would like to discuss it first."},"comment":{"url":"https://api.github.com/repos/rtfeldman/seamless-immutable/issues/comments/154743440","html_url":"https://github.com/rtfeldman/seamless-immutable/issues/76#issuecomment-154743440","issue_url":"https://api.github.com/repos/rtfeldman/seamless-immutable/issues/76","id":154743440,"user":{"login":"rtfeldman","id":1094080,"avatar_url":"https://avatars.githubusercontent.com/u/1094080?v=3","gravatar_id":"","url":"https://api.github.com/users/rtfeldman","html_url":"https://github.com/rtfeldman","followers_url":"https://api.github.com/users/rtfeldman/followers","following_url":"https://api.github.com/users/rtfeldman/following{/other_user}","gists_url":"https://api.github.com/users/rtfeldman/gists{/gist_id}","starred_url":"https://api.github.com/users/rtfeldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtfeldman/subscriptions","organizations_url":"https://api.github.com/users/rtfeldman/orgs","repos_url":"https://api.github.com/users/rtfeldman/repos","events_url":"https://api.github.com/users/rtfeldman/events{/privacy}","received_events_url":"https://api.github.com/users/rtfeldman/received_events","type":"User","site_admin":false},"created_at":"2015-11-07T19:59:48Z","updated_at":"2015-11-07T19:59:48Z","body":"I'm surprised by this too! Assuming it wouldn't have noticeable performance costs, I'd be happy to accept a PR that fixed this."}}