From 8fef46d837e8d85c48a4c6f42bfe0b9f50effd8f Mon Sep 17 00:00:00 2001 From: Emanuele Zavallone Date: Thu, 16 May 2019 11:03:00 +0200 Subject: [PATCH] IsTruthyValue, fixed decimal cast --- src/Stubble.Core/Contexts/Context.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stubble.Core/Contexts/Context.cs b/src/Stubble.Core/Contexts/Context.cs index 9dba386..45ad630 100644 --- a/src/Stubble.Core/Contexts/Context.cs +++ b/src/Stubble.Core/Contexts/Context.cs @@ -207,7 +207,7 @@ public bool IsTruthyValue(object value) if (value is decimal) { - return (int)value != 0m; + return (decimal)value != 0m; } if (value is float)