mdn / express-locallibrary-tutorial

Local Library website written in NodeJS/Express; example for the MDN server-side development NodeJS module: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs.
Creative Commons Zero v1.0 Universal
1.23k stars 695 forks source link

BookInstance - improve selected option code #238

Closed hamishwillee closed 11 months ago

hamishwillee commented 11 months ago

This improves the pug form for the BookInstance update template so that the selected book has <option selected> rather than <option selected="selected">. NOte that both are valid, and both work. It's just that the changed version is more familiar and easier to read.

note that setting the value to false is somewhat arbitrary - any value other than selected or the null string is taken as false.

This is a response to https://github.com/mdn/content/issues/29859