-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Fix a bug in createTextNode when the data argument is a non-string #1384
Conversation
…ument is a non-string
@@ -1165,8 +1165,13 @@ export default class Document extends Node { | |||
* @param [data] Text data. | |||
* @returns Text node. | |||
*/ | |||
public createTextNode(data?: string): Text { | |||
return NodeFactory.createNode<Text>(this, this[PropertySymbol.ownerWindow].Text, data); | |||
public createTextNode(data: string): Text { |
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.
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.
I would consider this as a bug fix as it is very unlikely to affect a consumer, but of course it would be great if this fix could be added as part of a major release. I think it is fine for this case.
I noticed that the CI tests failed after I submitted my pull request. |
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.
Thank you for your contribution @odanado! ⭐
It's a known problem that has to be fixed. It is related to a timing issue with the cache expire time for in |
Close #1380
Run in Chrome:
Run in Safari:
Run in Firefox: