I am encountering an issue with my EJS code:
<link rel="stylesheet" type="text/css" href="/public/stylesheets/<%= css || 'default' %>.css" />
My expectation was that if css
is undefined, it would default to
"/public/stylesheets/default.css"
. However, instead of the expected result, I am getting an error message:
css is not defined
Can someone explain if this behavior is a specific quirk of EJS, or if there might be something that I am misunderstanding?