Closed yeskunall closed 6 years ago
This fails with value: <falsy value like 0 or ''>
I'd suggest either Object.assign
or a test against undefined
instead of ||
You are correct. It picks up href
if the other value in the expression is falsy. Sorry, I'll look into it. 🙈
So close to a merge! :)
@bfred-it honestly was expecting it to be an easy fix, but I seem to be stumped. I could use some help here.
I started by simply wrapping options.value
in a String
so as to explicitly convert the value
, since the end result is a string anyway, but that didn't work out.
I'd suggest either Object.assign or a test against undefined instead of ||
Maybe you could elaborate a bit more on this?
typeof options.value === ‘undefined’ ? href : options.value
Thanks for the PR @yeskunall 🎉
Fixes #10