diff --git a/resources/vue/components/courseware/CoursewareFileChooser.vue b/resources/vue/components/courseware/CoursewareFileChooser.vue index 0daaa541b7232c40c7803ef6690f90ad3fdb28f2..9e5eaa96e4f5d8b88ba06d8d050f1913f111dde7 100755 --- a/resources/vue/components/courseware/CoursewareFileChooser.vue +++ b/resources/vue/components/courseware/CoursewareFileChooser.vue @@ -74,7 +74,9 @@ export default { }, filterFiles(loadArray) { const filterFile = (file) => { - if (this.relatedTermOfUse({parent: file, relationship: 'terms-of-use'}).attributes['download-condition'] !== 0) { + let fileTermsOfUse = this.relatedTermOfUse({parent: file, relationship: 'terms-of-use'}); + + if (fileTermsOfUse !== null && fileTermsOfUse.attributes['download-condition'] !== 0) { return false; } if (this.selectedFolderId !== '' && this.selectedFolderId !== file.relationships.parent.data.id) {