{"action":"created","issue":{"url":"https://api.github.com/repos/hoodiehq/hoodie-store-client/issues/112","repository_url":"https://api.github.com/repos/hoodiehq/hoodie-store-client","labels_url":"https://api.github.com/repos/hoodiehq/hoodie-store-client/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/hoodiehq/hoodie-store-client/issues/112/comments","events_url":"https://api.github.com/repos/hoodiehq/hoodie-store-client/issues/112/events","html_url":"https://github.com/hoodiehq/hoodie-store-client/pull/112","id":171303664,"number":112,"title":"removeAll() rejects with error if no docs in scope","user":{"login":"capellini","id":75311,"avatar_url":"https://avatars.githubusercontent.com/u/75311?v=3","gravatar_id":"","url":"https://api.github.com/users/capellini","html_url":"https://github.com/capellini","followers_url":"https://api.github.com/users/capellini/followers","following_url":"https://api.github.com/users/capellini/following{/other_user}","gists_url":"https://api.github.com/users/capellini/gists{/gist_id}","starred_url":"https://api.github.com/users/capellini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capellini/subscriptions","organizations_url":"https://api.github.com/users/capellini/orgs","repos_url":"https://api.github.com/users/capellini/repos","events_url":"https://api.github.com/users/capellini/events{/privacy}","received_events_url":"https://api.github.com/users/capellini/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-16T01:55:24Z","updated_at":"2016-08-16T19:07:43Z","closed_at":"2016-08-16T18:00:03Z","pull_request":{"url":"https://api.github.com/repos/hoodiehq/hoodie-store-client/pulls/112","html_url":"https://github.com/hoodiehq/hoodie-store-client/pull/112","diff_url":"https://github.com/hoodiehq/hoodie-store-client/pull/112.diff","patch_url":"https://github.com/hoodiehq/hoodie-store-client/pull/112.patch"},"body":"Calling `hoodie.store(scopeName).removeAll()` when there are no documents with type: scopeName results in an uncaught error `Items not found`.  This is due to the fact that in `removeAll()` we call `remove()` even if the list of returned objects is empty.  `remove()` eventually calls `find()` which then throws an `Items not found` error.\r\n\r\nInstead, `hoodie.store(scopeName).removeAll()` should just return an empty list.  This change returns early if `findAll()` returns an empty list in `removeAll()`.\r\n\r\nCloses #110."},"comment":{"url":"https://api.github.com/repos/hoodiehq/hoodie-store-client/issues/comments/240205649","html_url":"https://github.com/hoodiehq/hoodie-store-client/pull/112#issuecomment-240205649","issue_url":"https://api.github.com/repos/hoodiehq/hoodie-store-client/issues/112","id":240205649,"user":{"login":"Charlotteis","id":542140,"avatar_url":"https://avatars.githubusercontent.com/u/542140?v=3","gravatar_id":"","url":"https://api.github.com/users/Charlotteis","html_url":"https://github.com/Charlotteis","followers_url":"https://api.github.com/users/Charlotteis/followers","following_url":"https://api.github.com/users/Charlotteis/following{/other_user}","gists_url":"https://api.github.com/users/Charlotteis/gists{/gist_id}","starred_url":"https://api.github.com/users/Charlotteis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Charlotteis/subscriptions","organizations_url":"https://api.github.com/users/Charlotteis/orgs","repos_url":"https://api.github.com/users/Charlotteis/repos","events_url":"https://api.github.com/users/Charlotteis/events{/privacy}","received_events_url":"https://api.github.com/users/Charlotteis/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T19:07:43Z","updated_at":"2016-08-16T19:07:43Z","body":"@capellini welcome to the team!"}}
{"actor":{"display_login":"Charlotteis"}}