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

Mystery else and assignment in human.ts #125

Open
clibu opened this issue Oct 15, 2020 · 2 comments
Open

Mystery else and assignment in human.ts #125

clibu opened this issue Oct 15, 2020 · 2 comments

Comments

@clibu
Copy link

clibu commented Oct 15, 2020

The conditional

if (format.text) {

does:

		} else {
			result = format.text
		}

Which doesn't make sense to me. ie. format.text is undefined in the else case.

@balupton
Copy link
Member

balupton commented Oct 15, 2020

In the else case it is the result of format arguments, which would return a falsely result, which we'd still wish to return to represent the arguments accurately

Could be a flaw in my intention though. As if it is a falsely value, and not null or undefined, we probably want to do the how spiel of the true case.

Will need to do some tests around it to determine what the intention and operation should be.

@clibu
Copy link
Author

clibu commented Oct 15, 2020

In this case should it return a falsey result or null. Transform.write() checks for null, but will pass false on which doesn't seem right.

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

No branches or pull requests

2 participants