{"action":"created","issue":{"url":"https://api.github.com/repos/phobosjs/phobos.js/issues/26","repository_url":"https://api.github.com/repos/phobosjs/phobos.js","labels_url":"https://api.github.com/repos/phobosjs/phobos.js/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/phobosjs/phobos.js/issues/26/comments","events_url":"https://api.github.com/repos/phobosjs/phobos.js/issues/26/events","html_url":"https://github.com/phobosjs/phobos.js/issues/26","id":132416452,"number":26,"title":"Cannot read property while deleting a item","user":{"login":"harianus","id":1079135,"avatar_url":"https://avatars.githubusercontent.com/u/1079135?v=3","gravatar_id":"","url":"https://api.github.com/users/harianus","html_url":"https://github.com/harianus","followers_url":"https://api.github.com/users/harianus/followers","following_url":"https://api.github.com/users/harianus/following{/other_user}","gists_url":"https://api.github.com/users/harianus/gists{/gist_id}","starred_url":"https://api.github.com/users/harianus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harianus/subscriptions","organizations_url":"https://api.github.com/users/harianus/orgs","repos_url":"https://api.github.com/users/harianus/repos","events_url":"https://api.github.com/users/harianus/events{/privacy}","received_events_url":"https://api.github.com/users/harianus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-09T13:15:36Z","updated_at":"2016-02-09T13:56:51Z","closed_at":null,"body":"When running `DELETE` on `http://localhost:5020/tasks/56b9e60ff6b55a2c279f488a`:\r\n\r\n```\r\nTypeError: Cannot read property &#39;remove&#39; of null\r\n<br> &nbsp; &nbsp;at mutate (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/phobosjs/middleware/mutate.js:35:25)\r\n<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/express/lib/router/layer.js:95:5)\r\n<br> &nbsp; &nbsp;at next (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/express/lib/router/route.js:131:13)\r\n<br> &nbsp; &nbsp;at applyScope (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/phobosjs/middleware/apply-scope.js:30:29)\r\n<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/express/lib/router/layer.js:95:5)\r\n<br> &nbsp; &nbsp;at next (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/express/lib/router/route.js:131:13)\r\n<br> &nbsp; &nbsp;at ownership (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/phobosjs/middleware/ownership.js:19:29)\r\n<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/express/lib/router/layer.js:95:5)\r\n<br> &nbsp; &nbsp;at next (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/express/lib/router/route.js:131:13)\r\n<br> &nbsp; &nbsp;at scopeCatch (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/phobosjs/middleware/scope-catch.js:40:14)\r\n<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/express/lib/router/layer.js:95:5)\r\n<br> &nbsp; &nbsp;at next (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/express/lib/router/route.js:131:13)\r\n<br> &nbsp; &nbsp;at /Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/phobosjs/middleware/query-runner.js:60:28\r\n<br> &nbsp; &nbsp;at Query.&lt;anonymous&gt; (/Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/mongoose/lib/query.js:2149:28)\r\n<br> &nbsp; &nbsp;at /Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/kareem/index.js:177:19\r\n<br> &nbsp; &nbsp;at /Users/Adriaan/MGMco/phobosjs-sampleapp/node_modules/kareem/index.js:109:16\r\n```"},"comment":{"url":"https://api.github.com/repos/phobosjs/phobos.js/issues/comments/181873875","html_url":"https://github.com/phobosjs/phobos.js/issues/26#issuecomment-181873875","issue_url":"https://api.github.com/repos/phobosjs/phobos.js/issues/26","id":181873875,"user":{"login":"mtimofiiv","id":428948,"avatar_url":"https://avatars.githubusercontent.com/u/428948?v=3","gravatar_id":"","url":"https://api.github.com/users/mtimofiiv","html_url":"https://github.com/mtimofiiv","followers_url":"https://api.github.com/users/mtimofiiv/followers","following_url":"https://api.github.com/users/mtimofiiv/following{/other_user}","gists_url":"https://api.github.com/users/mtimofiiv/gists{/gist_id}","starred_url":"https://api.github.com/users/mtimofiiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtimofiiv/subscriptions","organizations_url":"https://api.github.com/users/mtimofiiv/orgs","repos_url":"https://api.github.com/users/mtimofiiv/repos","events_url":"https://api.github.com/users/mtimofiiv/events{/privacy}","received_events_url":"https://api.github.com/users/mtimofiiv/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T13:56:51Z","updated_at":"2016-02-09T13:56:51Z","body":"\r\n<img src=\"https://cloud.githubusercontent.com/assets/428948/12918075/5365d744-cf3d-11e5-8f07-523400a0a11f.gif\" width=\"100%\">\r\n\r\n\r\nAppears that [this](https://github.com/phobosjs/phobos.js/blob/master/middleware/mutate.js#L24) is not functioning correctly on deletes."}}