node.js - Multiple logical OR Operators in Jade -
very simple: want make <img>
-tag if mimetype of file image
case comment.filetype when "image/png" || "image/gif" || "image/jpeg" img(src="/files/#{comment.filelink}")
does not work
it works png, not jpeg or gif. there trick?
i think work:
case comment.filetype when "image/png" when "image/gif" when "image/jpeg" img(src="/files/#{comment.filelink}")
Comments
Post a Comment