-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fixes NullReferenceException with recursive GetVortoValue #100
Conversation
Fix for NullReferenceException when calling GetVortoValue : allow return of defaultValue or if the recursive parameter set true traversal up the tree.
Whitespacing formatting, to match current code style
Thanks @drangus! 🎉 I've updated the PR with whitespace formatting - to match the current code style. Once @mattbrailsford is happy, we can merge it in 👍 |
Was just about to submit a PR for this as well. This change should also be added to DoInnerHasVortoValue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imho the unnecessary nesting should be replaced with something like
if (prop == null)
{
return defaultValue;
}
Was just going to raise an issue/PR for this! Might it be approved/merged/released soon? Anything I can do to help? |
…ed it in the HasVortoValue check
This has now been merged in (and tweaked as per @sniffdk's suggestions) and is available via the build server https://ci.appveyor.com/project/UMCO/umbraco-vorto/build/1.6.1.114/artifacts or via MyGet https://www.myget.org/gallery/umbraco-packages. I'll have a chat with @leekelleher to see if we push a release out now, or try and address any of the open issues first. |
The applied patch doesn't allow recursion! Change to:
|
Fix for NullReferenceException when calling GetVortoValue : allow return of defaultValue or if the recursive parameter set true traversal up the tree.