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

Address4 addressMinusSuffix nilable query #143

Open
napei opened this issue Aug 1, 2021 · 2 comments
Open

Address4 addressMinusSuffix nilable query #143

napei opened this issue Aug 1, 2021 · 2 comments

Comments

@napei
Copy link

napei commented Aug 1, 2021

Just querying addressMinusSuffix for Address4 and why it's nilable? From what I can see, its definitely assigned in the constructor:

this.addressMinusSuffix = address;

Perhaps I missed something though.

I'm assuming perhaps the constructor should actually complain before it parses the address if it's undefined, because if the provided address is undefined then there's no point continuing?

I'm running into a coverage issue in my library, as theoretically it won't ever be null which means I need to wrap the code in a check, either ?. or if (!a.addressMinusSuffix) which will never be exeuted, which means my coverage isn't 100%, which annoys me 😂

@beaugunderson
Copy link
Owner

beaugunderson commented Aug 1, 2021 via email

@napei
Copy link
Author

napei commented Aug 1, 2021

great catch, happy to merge that change :)

Do we want to throw earlier in the constructor instead? Or just leave the throw in parse()?

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 a pull request may close this issue.

2 participants