GlimmerLabs / MathOverImages

A language and ecosystems for doing math over abstract images.
GNU Lesser General Public License v3.0
4 stars 3 forks source link

Log-out while in album causes page to crash #43

Closed wolterzo closed 10 years ago

wolterzo commented 10 years ago

If you're logged in, go into your album, then logout, this message occurs (localhost)

TypeError: /Users/rebelsky/Documents/MAP2014/MathOverImages/Site/views/album-contents.ejs:88 86| images 87|

88| <% if (album.owner === user.username) { %> 89|

90| 91|

Cannot read property 'username' of null at eval (eval at (/Users/rebelsky/Documents/MAP2014/MathOverImages/Site/node_modules/ejs/lib/ejs.js:242:14), :29:3693) at eval (eval at (/Users/rebelsky/Documents/MAP2014/MathOverImages/Site/node_modules/ejs/lib/ejs.js:242:14), :29:7675) at /Users/rebelsky/Documents/MAP2014/MathOverImages/Site/node_modules/ejs/lib/ejs.js:255:15 at Object.exports.render (/Users/rebelsky/Documents/MAP2014/MathOverImages/Site/node_modules/ejs/lib/ejs.js:293:13) at View.exports.renderFile as engine at View.render (/Users/rebelsky/Documents/MAP2014/MathOverImages/Site/node_modules/express/lib/view.js:76:8) at Function.app.render (/Users/rebelsky/Documents/MAP2014/MathOverImages/Site/node_modules/express/lib/application.js:496:10) at ServerResponse.res.render (/Users/rebelsky/Documents/MAP2014/MathOverImages/Site/node_modules/express/lib/response.js:794:7) at /Users/rebelsky/Documents/MAP2014/MathOverImages/Site/functions/album-contents.js:60:17 at module.exports.getAlbumInfo (/Users/rebelsky/Documents/MAP2014/MathOverImages/Site/functions/database.js:984:7)