/home/panda/makongalleria/views/layout.pug:41
39| if data == undefined
40| else if data.locale === 'en'
> 41| - var finId = data.localizations[0].id
42| a(href=`?lang=${finId}`) Suomeksi
43| else if data.locale === 'fi'
44| - var enId = data.localizations[0].id
Cannot read property 'id' of undefined
TypeError: /home/panda/makongalleria/views/layout.pug:41
39| if data == undefined
40| else if data.locale === 'en'
> 41| - var finId = data.localizations[0].id
42| a(href=`?lang=${finId}`) Suomeksi
43| else if data.locale === 'fi'
44| - var enId = data.localizations[0].id
Cannot read property 'id' of undefined
at eval (eval at wrap (/home/panda/makongalleria/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:79:35)
at template (eval at wrap (/home/panda/makongalleria/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:216:50)
at Object.exports.renderFile (/home/panda/makongalleria/node_modules/pug/lib/index.js:418:38)
at Object.exports.renderFile (/home/panda/makongalleria/node_modules/pug/lib/index.js:408:21)
at View.exports.__express [as engine] (/home/panda/makongalleria/node_modules/pug/lib/index.js:455:11)
at View.render (/home/panda/makongalleria/node_modules/express/lib/view.js:135:8)
at tryRender (/home/panda/makongalleria/node_modules/express/lib/application.js:640:10)
at Function.render (/home/panda/makongalleria/node_modules/express/lib/application.js:592:3)
at ServerResponse.render (/home/panda/makongalleria/node_modules/express/lib/response.js:1008:7)
at Request._callback (/home/panda/makongalleria/routes/index.js:28:9)