diff --git a/js/scorm/wrapper.js b/js/scorm/wrapper.js index 5821aff9..19bfa940 100644 --- a/js/scorm/wrapper.js +++ b/js/scorm/wrapper.js @@ -547,7 +547,9 @@ class ScormWrapper { if (!Adapt.course) return; const config = Adapt.course.get('_spoor'); - const messages = Object.assign({}, ScormError.defaultMessages, config && config._messages); + const defaultMessages = ScormError.defaultMessages; + const configMessages = config?.['_messages'] || {}; + const messages = Object.assign({}, defaultMessages, configMessages); const message = Handlebars.compile(messages[error.name])(error.data); switch (error.name) {