I am trying to display some information based on a condition in Jade.
But seems like the else statement is always executing.
My first statement is if the message is string then it should execute the if statement else it should print the else statement. But seems like there is something wrong with the pug file condition itself, which I am unable to figure out.
Code :
body
- if(typeof(message)==='string'){
div= message
-}
- else{
div
.divider-padded
table.table.withbackground.width-100
+dispatch-summary(message)
+dispatch-pending-summary(message)
-}
Regards