From 60bbe614392332bddc2adbfc0dea3622ed3af2e3 Mon Sep 17 00:00:00 2001 From: Alois Date: Wed, 26 Sep 2018 10:02:28 +0200 Subject: [PATCH] Add integer support to IsTruthy --- Nustache.Core/RenderContext.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Nustache.Core/RenderContext.cs b/Nustache.Core/RenderContext.cs index 0b314a7..149f486 100644 --- a/Nustache.Core/RenderContext.cs +++ b/Nustache.Core/RenderContext.cs @@ -234,6 +234,11 @@ public bool IsTruthy(object value) { return (bool)value; } + + if (value is int) + { + return (int)value != 0; + } if (value is string) {