Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow missing keys when inv and lenient=true #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alkebuware
Copy link

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.

@Calpoog
Copy link

Calpoog commented Aug 5, 2022

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!

@davidpanic
Copy link

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?

@codekeyz
Copy link

codekeyz commented Dec 9, 2023

@jonahwilliams Thanks for this amazing library. Can you spend some time closing each of these PRs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants