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

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -