{"action":"reopened","issue":{"url":"https://api.github.com/repos/Secbone/koa-session2/issues/1","repository_url":"https://api.github.com/repos/Secbone/koa-session2","labels_url":"https://api.github.com/repos/Secbone/koa-session2/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Secbone/koa-session2/issues/1/comments","events_url":"https://api.github.com/repos/Secbone/koa-session2/issues/1/events","html_url":"https://github.com/Secbone/koa-session2/issues/1","id":150834445,"number":1,"title":"Hi,I add koa-session2  Middleware,but when use session ,make error","user":{"login":"soulxy","id":4191972,"avatar_url":"https://avatars.githubusercontent.com/u/4191972?v=3","gravatar_id":"","url":"https://api.github.com/users/soulxy","html_url":"https://github.com/soulxy","followers_url":"https://api.github.com/users/soulxy/followers","following_url":"https://api.github.com/users/soulxy/following{/other_user}","gists_url":"https://api.github.com/users/soulxy/gists{/gist_id}","starred_url":"https://api.github.com/users/soulxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soulxy/subscriptions","organizations_url":"https://api.github.com/users/soulxy/orgs","repos_url":"https://api.github.com/users/soulxy/repos","events_url":"https://api.github.com/users/soulxy/events{/privacy}","received_events_url":"https://api.github.com/users/soulxy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-04-25T11:57:11Z","updated_at":"2016-04-27T14:36:19Z","closed_at":null,"body":"I followed your demo to add my middleware, found some problem.\r\n\r\nmy code:\r\n  - app.js\r\n\r\n  //if the following ,I cannt view my page;\r\n  `app.use(session({store:new Store()}))`\r\n\r\n  `app.use(convert(session({store: new Store()})));`  //the same question\r\n\r\n   // so,I have to write like this... , maybe some problem?\r\n\r\n   `app.use(async (ctx, next) => {\r\n       session({\r\n       store: new Store()\r\n     });\r\n     await next();\r\n    });` \r\n\r\n- user.js\r\n  \r\n   `let  result = {......};`\r\n\r\n   `ctx.session.view = result;`\r\n\r\n##error\r\n------------\r\n  TypeError: Cannot set property 'view' of undefined\r\n      at app.js:36:3\r\n      at dispatch (E:\\mywork\\koa2.0\\node_modules\\koa\\node_modules\\koa-compose\\in          dex.js:43:32)\r\n      at next (E:\\mywork\\koa2.0\\node_modules\\koa\\node_modules\\koa-compose\\index.          js:44:18)\r\n      at app.js:31:9\r\n      at [object Generator].next (native)\r\n      at step (app.js:23:1)\r\n      at app.js:23:1\r\n      at new Promise (E:\\mywork\\koa2.0\\node_modules\\runkoa\\node_modules\\babel-po          lyfill\\node_modules\\core-js\\modules\\es6.promise.js:193:7)\r\n      at app.js:23:1\r\n      at app.js:27:9\r\n      at dispatch (E:\\mywork\\koa2.0\\node_modules\\koa\\node_modules\\koa-compose\\in          dex.js:43:32)\r\n      at next (E:\\mywork\\koa2.0\\node_modules\\koa\\node_modules\\koa-compose\\index.          js:44:18)\r\n      at E:\\mywork\\koa2.0\\node_modules\\koa-bodyparser\\index.js:60:14\r\n      at run (E:\\mywork\\koa2.0\\node_modules\\runkoa\\node_modules\\babel-polyfill\\n          ode_modules\\core-js\\modules\\es6.promise.js:89:22)\r\n      at E:\\mywork\\koa2.0\\node_modules\\runkoa\\node_modules\\babel-polyfill\\node_m          odules\\core-js\\modules\\es6.promise.js:102:28\r\n      at flush (E:\\mywork\\koa2.0\\node_modules\\runkoa\\node_modules\\babel-polyfill          \\node_modules\\core-js\\modules\\_microtask.js:14:5)\r\n      at nextTickCallbackWith0Args (node.js:415:9)\r\n      at process._tickCallback (node.js:344:13)\r\n"}}