Open johnytiago opened 7 years ago
EventDeck is constantly throwing this error:
Debug: hapi, internal, implementation, error TypeError: Uncaught error: Cannot read property 'advertisementLvl' of undefined at renderObject (/home/production/eventdeck/server/views/company.js:32:129) at render (/home/production/eventdeck/server/views/company.js:15:10) at exports.get.handler (/home/production/eventdeck/server/routes/companies/handlers.js:99:11) at Object.internals.handler (/home/production/eventdeck/node_modules/hapi/lib/handler.js:91:27) ...
The problem comes from here at server/views/company.js:
server/views/company.js
advertisementLvl: model.participations.filter(function (p) { return p.advertisementLvl && p.status === PUBLIC_STATUS })[0].advertisementLvl¬
If there is no participation that passes the filter the array will be empty and therefore the error.
participation
EventDeck is constantly throwing this error:
The problem comes from here at
server/views/company.js
:If there is no
participation
that passes the filter the array will be empty and therefore the error.