mustache
mustache copied to clipboard
Allow missing keys when inv and lenient=true
I encountered a bug where if a key wasn't listed in the map passed to renderString then an exception would be thrown even though lenient was true.
I've relaxed the type requirements of pop() method as this is where the exception as throwing since _stack can have dynamic values but the return value of pop() was non-nullable.
Now the inversion symbol {{^email2}}{{email}}{{/email2}} works as expected and prints the interpolated value of email.
I arrived at this same conclusion independently... Should have checked the PRs first :) Please merge this as it's a pretty straightforward and needed solution!
Ah great, another abandoned dart library, @jonahwilliams would you be kind enough to merge and publish this so I don't have to make a duplicate package for one trivial line of code change?
@jonahwilliams Thanks for this amazing library. Can you spend some time closing each of these PRs?