You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v4.9.0 migration errors when course/components have no _tutor (_autoScrollWhenInline) #134
The Tutor - 4.8.0 to 4.9.0 migration in migrations/v4.js throws when a course or component has no existing _tutor object:
TypeError: Cannot read properties of undefined (reading '_autoScrollWhenInline')
Cause
The mutate steps use _.set(course._tutor, '_autoScrollWhenInline', true) and _.set(component._tutor, '_autoScrollWhenInline', true). When _tutor is undefined, _.set is given an undefined target and silently no-ops, so the property is never written. The following checkContent steps then read course._tutor._autoScrollWhenInline / _tutor._autoScrollWhenInline off the still-undefined_tutor and throw.
The block's own testSuccessWhere fixtures hit this — { _type: 'course' } (no _tutor) and { _id: 'c-105', _component: 'mcq' } (no _tutor).
Unlike the earlier blocks in the same file (e.g. 4.0.0, 4.0.0 to 4.1.0), this block does not ensure _tutor exists before populating it.
Fix
Set via the parent with a dotted path so lodash creates the intermediate _tutor when missing (and preserves an existing one):
Activity
Chore(release): 4.10.1 [skip ci]
github-actions commentedon Jul 26, 2026
🎉 This issue has been resolved in version 4.10.1 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀