From efe7709827f8c0627fa8ad35ef4440a3e606c714 Mon Sep 17 00:00:00 2001 From: tanner0101 Date: Mon, 13 Jul 2020 14:50:03 -0400 Subject: [PATCH] fix stack enter/leave for string vars --- Sources/Mustache/MustacheContext.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Sources/Mustache/MustacheContext.swift b/Sources/Mustache/MustacheContext.swift index 81f4b2d..66a1fa6 100644 --- a/Sources/Mustache/MustacheContext.swift +++ b/Sources/Mustache/MustacheContext.swift @@ -74,7 +74,12 @@ struct MustacheContext { self.stack.append(data) return true case .string(let string): - return !["false", "0"].contains(string.lowercased()) + if !["false", "0"].contains(string.lowercased()) { + self.stack.append(data) + return true + } else { + return false + } } }