diff --git a/js/scorm/wrapper.js b/js/scorm/wrapper.js index e03c705..8d613af 100644 --- a/js/scorm/wrapper.js +++ b/js/scorm/wrapper.js @@ -569,7 +569,7 @@ class ScormWrapper { if (error.data.value === '') error.data.value = '\'\''; } const config = Adapt.course.get('_spoor'); - const messages = Object.assign({}, ScormError.defaultMessages, config && config._messages); + const messages = Object.assign({}, ScormError.defaultMessages, config?._messages || {}); const message = Handlebars.compile(messages[error.name])(error.data); this.logger.error(message); if (this.isUnsupportedErrorCode(error.data.errorCode)) return;