Skip to content

Commit

Permalink
Merge pull request #15 from tanner0101/tn-stack-fix
Browse files Browse the repository at this point in the history
Fix stack enter/leave for string vars
  • Loading branch information
tanner0101 authored Jul 13, 2020
2 parents 94104a8 + efe7709 commit d98546e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Sources/Mustache/MustacheContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

Expand Down

0 comments on commit d98546e

Please sign in to comment.