Closed greg-simon closed 5 years ago
Previously, only String types were checked for being empty. Now the Formatter is used to format the Object before checking for being empty.
Example of before change behaviour:
Mustache.Compiler compiler = Mustache.compiler().emptyStringIsFalse(true); compiler.isFalsey(""); // true Object myEmptyStrObj = new Object(){ @Override public String toString() { return ""; } }; compiler.isFalsey(myEmptyStrObj); // false
After this change both isFalsey calls will return true;
isFalsey
true
Previously, only String types were checked for being empty. Now the Formatter is used to format the Object before checking for being empty.
Example of before change behaviour:
After this change both
isFalsey
calls will returntrue
;