{"action":"opened","issue":{"url":"https://api.github.com/repos/hoodiehq/hoodie-client/issues/89","repository_url":"https://api.github.com/repos/hoodiehq/hoodie-client","labels_url":"https://api.github.com/repos/hoodiehq/hoodie-client/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/hoodiehq/hoodie-client/issues/89/comments","events_url":"https://api.github.com/repos/hoodiehq/hoodie-client/issues/89/events","html_url":"https://github.com/hoodiehq/hoodie-client/issues/89","id":169114785,"number":89,"title":"Hoodie constructor does not pass through options properly","user":{"login":"espy","id":391124,"avatar_url":"https://avatars.githubusercontent.com/u/391124?v=3","gravatar_id":"","url":"https://api.github.com/users/espy","html_url":"https://github.com/espy","followers_url":"https://api.github.com/users/espy/followers","following_url":"https://api.github.com/users/espy/following{/other_user}","gists_url":"https://api.github.com/users/espy/gists{/gist_id}","starred_url":"https://api.github.com/users/espy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/espy/subscriptions","organizations_url":"https://api.github.com/users/espy/orgs","repos_url":"https://api.github.com/users/espy/repos","events_url":"https://api.github.com/users/espy/events{/privacy}","received_events_url":"https://api.github.com/users/espy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hoodiehq/hoodie-client/labels/Type:%20Bug","name":"Type: Bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-03T12:00:51Z","updated_at":"2016-08-03T12:00:51Z","closed_at":null,"body":"The docs say we can pass in options to the Hoodie constructor:\r\n```javascript\r\n  var hoodie = new Hoodie(options)\r\n```\r\nand that these look something like this:\r\n```javascript\r\n  var options = {\r\n    account: {\r\n      id: '9h57fpa'\r\n    }\r\n  }\r\n```\r\nHowever, taking a look at https://github.com/hoodiehq/hoodie-client/blob/master/lib/get-state.js#L9-L16, all of these sub options [described in the docs](https://github.com/hoodiehq/hoodie-client#constructor) are ignored completely.\r\n\r\nOur use case was that we wanted to open an existing user's DB in Service Worker. We did\r\n```javascript\r\n  const store = new Hoodie({\r\n    account: {\r\n      id: '9h57fpa'\r\n    }\r\n  })\r\n```\r\nbut Hoodie ignores the options and creates a new user DB with a random ID instead."}}
{"actor":{"display_login":"espy"}}