Closed Bug 1474228 Opened 7 years ago Closed 5 years ago

TypeError: views/book_list.pug: 10 " | (#{book.author.name}) " Cannot read property 'name' of null

Categories

(Developer Documentation Graveyard :: Learning Area, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: zsmith126028, Assigned: cmills, NeedInfo)

References

()

Details

:: Developer Documentation Request Request Type: Correction Gecko Version: unspecified Technical Contact: :: Details There is a TypeError in the code for book_list.pug in line 10. I've copied and pasted the code straight from the tutorial and it's returning an error when I try to load the 'All books' list. The other pages for the tutorial Local Library site are working fine, but the book lists page is not. TypeError: \express-locallibrary-tutorial\views\book_list.pug:10 8| li 9| a(href=book.url) #{book.title} > 10| | (#{book.author.name}) 11| 12| else 13| li There are no books.
I think this might be because of an indentation issue. Look at our final version on: https://github.com/mdn/express-locallibrary-tutorial/blob/master/views/book_list.pug If you use the exact code form here, does it work better for you?
Assignee: nobody → cmills
Flags: needinfo?(zsmith126028)
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.