F
F
First Name2017-12-15 16:00:04
JavaScript
First Name, 2017-12-15 16:00:04

How to correctly write a condition for the output with zero in pug?

Good day to all.
I pass the minsumm variable to the render.
It can contain (0, ' ', any number)
You need to write a condition, if a number is not specified, then it displays

individual

If any number is specified, output
From...

Now the minsumm variable is 0, I write such conditions
if(minsumm !=null)
   | От !{minsumm}
else
   | индивид.

if(minsumm !=' ')
   | От !{minsumm}
else
   | индивид.

But it still displays an individual, although it costs 0.
I hope I explained it well :)
PS Thank you in advance for the answers, please don’t throw slippers

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Wolf, 2017-12-15
@maxxtweek

https://habrahabr.ru/post/138272/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question