Sportaxy / sportaxy

0 stars 0 forks source link

bug that crashed the server #137

Closed vohtaski closed 7 years ago

vohtaski commented 8 years ago

have to check if (event !== undefined)

/home/vohtaski/public_html/sportaxy.com/releases/20150622235652/app/controllers/comment_controller.js:50
    app.Calendar.find({ where: { id: event.calendar_id } }, this)
                                          ^
TypeError: Cannot read property 'calendar_id' of null
    at Function.Seq.seq.seq.seq.self (/home/vohtaski/public_html/sportaxy.com/releases/20150622235652/app/controllers/comment_controller.js:50:43)
    at Function.context.stack (/home/vohtaski/public_html/sportaxy.com/releases/20150622235652/node_modules/seq/index.js:101:24)
    at action (/home/vohtaski/public_html/sportaxy.com/releases/20150622235652/node_modules/seq/index.js:76:11)
    at Object.seq (/home/vohtaski/public_html/sportaxy.com/releases/20150622235652/node_modules/seq/index.js:93:13)
    at EventEmitter.saw.next (/home/vohtaski/public_html/sportaxy.com/releases/20150622235652/node_modules/seq/node_modules/chainsaw/index.js:52:18)
    at /home/vohtaski/public_html/sportaxy.com/releases/20150622235652/node_modules/seq/index.js:104:25
    at cb (/home/vohtaski/public_html/sportaxy.com/releases/20150622235652/node_modules/seq/index.js:55:24)
    at callback (/home/vohtaski/public_html/sportaxy.com/releases/20150622235652/app/models/app_model.js:74:7)
    at Query.<anonymous> (/home/vohtaski/public_html/sportaxy.com/node_modules/mysql/lib/client.js:108:11)
    at Query.EventEmitter.emit (events.js:92:17)