error loaidng page without sections

Issue #41 resolved
tim St. Clair created an issue

If you have a course that uses the “not reccomended” setting of ‘sub tiles in top section’ BUT there are no sections in the course, I get the ‘loading’ screen forever.

Turns out there’s a script error:

Uncaught TypeError: Cannot read property 'sections' of undefined
at Object.getContentSectionPositions (first.js:294)
at e (first.js:294)
at Object.runReOrg (first.js:294)

Throwing a rows length test inside the end of getContentSectionPositions will resolve the problem.

        if (rows.length) rows[rows.length - 1].displayAfterTile =
            rows[rows.length - 1].sections[(rows[rows.length - 1].sections).length - 1];

Comments (2)

  1. Log in to comment