diff --git a/webapp/src/views/schedule/index.vue b/webapp/src/views/schedule/index.vue index be0a1e04..6804a4ec 100644 --- a/webapp/src/views/schedule/index.vue +++ b/webapp/src/views/schedule/index.vue @@ -156,9 +156,9 @@ export default { if (results && results.length) { founds = self.schedule.talks.filter(t => { if (refKey === 'session_type') { - if (typeof t.session_type === 'string') { + if (typeof t?.session_type === 'string') { return selectedIds.includes(t.session_type) && results.includes(t.id) - } else { + } else if (typeof t?.session_type === 'object') { return Object.keys(t.session_type).some(key => selectedIds.includes(t.session_type[key])) && results.includes(t.id) } } @@ -166,9 +166,9 @@ export default { } else { founds = self.schedule.talks.filter(t => { if (refKey === 'session_type') { - if (typeof t.session_type === 'string') { + if (typeof t?.session_type === 'string') { return selectedIds.includes(t.session_type) - } else { + } else if (typeof t?.session_type === 'object') { return Object.keys(t.session_type).some(key => selectedIds.includes(t.session_type[key])) } } @@ -224,10 +224,10 @@ export default { const setSessionType = new Set() const enLanguage = 'en' - this.schedule.session_type.forEach(t => { - if (typeof t.session_type === 'string') { + this.schedule?.session_type.forEach(t => { + if (typeof t?.session_type === 'string') { setSessionType.add(t.session_type) - } else { + } else if (typeof t?.session_type === 'object') { const sessionTypeKeyArray = Object.keys(t.session_type) let isEnglish = false @@ -359,9 +359,9 @@ export default { data.forEach( t => { - if (typeof t.name === 'string') { + if (typeof t?.name === 'string') { setMap.set(t.id, t.name) - } else { + } else if (typeof t?.name === 'object') { const keyArray = Object.keys(t.name) let isEnglish = false diff --git a/webapp/src/views/schedule/sessions/index.vue b/webapp/src/views/schedule/sessions/index.vue index 95f6203e..2ec2691e 100644 --- a/webapp/src/views/schedule/sessions/index.vue +++ b/webapp/src/views/schedule/sessions/index.vue @@ -144,9 +144,9 @@ export default { if (results && results.length) { founds = self.schedule.talks.filter(t => { if (refKey === 'session_type') { - if (typeof t.session_type === 'string') { + if (typeof t?.session_type === 'string') { return selectedIds.includes(t.session_type) && results.includes(t.id) - } else { + } else if (typeof t?.session_type === 'object') { return Object.keys(t.session_type).some(key => selectedIds.includes(t.session_type[key])) && results.includes(t.id) } } @@ -154,9 +154,9 @@ export default { } else { founds = self.schedule.talks.filter(t => { if (refKey === 'session_type') { - if (typeof t.session_type === 'string') { + if (typeof t?.session_type === 'string') { return selectedIds.includes(t.session_type) - } else { + } else if (typeof t?.session_type === 'object') { return Object.keys(t.session_type).some(key => selectedIds.includes(t.session_type[key])) } } @@ -212,10 +212,10 @@ export default { const setSessionType = new Set() const enLanguage = 'en' - this.schedule.session_type.forEach(t => { - if (typeof t.session_type === 'string') { + this.schedule?.session_type?.forEach(t => { + if (typeof t?.session_type === 'string') { setSessionType.add(t.session_type) - } else { + } else if (typeof t?.session_type === 'object') { const sessionTypeKeyArray = Object.keys(t.session_type) let isEnglish = false @@ -347,9 +347,9 @@ export default { data.forEach( t => { - if (typeof t.name === 'string') { + if (typeof t?.name === 'string') { setMap.set(t.id, t.name) - } else { + } else if (typeof t?.name === 'object') { const keyArray = Object.keys(t.name) let isEnglish = false