6👍
You don’t need to explicitly check. This should be your line 10:
interactiveLeadConversations: (((data.sent / data.interactive) || 0) * 100).toFixed(0)
What I’m doing here is to replace the expression
(data.sent / data.interactive)
with
( (data.sent / data.interactive) || 0 )
NaN
evaluates to false
, so if the expression (data.sent / data.interactive)
equals NaN
, you are offering 0
as alternative.
- [Vuejs]-Can't add dynamic validation using vue-validator
- [Vuejs]-How can I use foreach in a Vue select?
Source:stackexchange.com