-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX beta] fix(glimmer/utils/to-bool): htmlSafe
#18148
[BUGFIX beta] fix(glimmer/utils/to-bool): htmlSafe
#18148
Conversation
@rwjblue Can you try restarting the build? There was a timeout.
|
I've restarted a few times, IE11 continues to fail in the same general way. 🤔 |
import { isArray } from '@ember/-internals/runtime'; | ||
import { Opaque } from '@glimmer/interfaces'; | ||
|
||
export default function toBool(predicate: Opaque): boolean { | ||
if (isArray(predicate)) { | ||
return (predicate as { length: number }).length !== 0; | ||
} else if (isHTMLSafe(predicate)) { | ||
return Boolean(String(predicate)); |
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.
Can we call the string? predicate.toString()
?
import { isArray } from '@ember/-internals/runtime'; | ||
import { Opaque } from '@glimmer/interfaces'; | ||
|
||
export default function toBool(predicate: Opaque): boolean { | ||
if (isArray(predicate)) { | ||
return (predicate as { length: number }).length !== 0; | ||
} else if (isHTMLSafe(predicate)) { | ||
return Boolean(String(predicate)); |
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.
So like this?
return Boolean(String(predicate)); | |
return Boolean(predicate.toString()); |
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.
ya, thats what I was thinking, but I'm not really sure if thats the issue or not (was just grasping at straws a bit)
813f8dc
to
f94de89
Compare
Thanks for the help! |
Fixes #17486.