gocodebox / gocodebox/lifterlms
Detaching and re-attaching a lesson causes builder error
- Dominant language
- PHP
- Stars
- 212
- Forks
- 140
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 19
Description
### Reproduction Steps
1. In the Course Builder for a course, click the Detach link on the left side to detach the lesson
2. Click **Save Changes**
3. Click the **Add Existing Lesson** and search for the recently detached lesson
4. Click on the lesson
### Expected Behavior
Adds the lesson and shows the properties
### Actual Behavior
Builder looks broken. You can refresh or close the modal for adding an existing lesson and click Settings, and it seems to reset.
### Error Messages / Logs
+ Include any relevant error messages or log files
```
Lesson.js:321 Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')
at n.is_first_in_section (Lesson.js:321:1)
at n.is_first_in_course (Lesson.js:273:1)
at n.get_sibling (Lesson.js:383:1)
at n.get_prev (Lesson.js:344:1)
at n.condition (llms-av-builder.js?ver=1.1.0:305:30)
at Jn (underscore.min.js?ver=1.13.7:2:7486)
at underscore.min.js?ver=1.13.7:2:7800
at underscore.min.js?ver=1.13.7:2:1065
at n.setup_field (SettingsFields.js:310:1)
at eval (eval at template (underscore.min.js?ver=1.13.7:2:15270), :30:23)
```
Contributor guide
Assessment
This issue has not been assessed yet.