🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@markraddatz
Copy link
Contributor

Adds a value === "" check to .replaceWith().

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not:

return value === "" ?
    this.remove() :
    this.domManip(…);

?

@gibson042
Copy link
Member

All true, @dmethvin. .domManip does some weird input handling, casting true to text but ignoring false (shades of #10867? 😈), and .replaceWith is the black sheep of manipulation methods. I'd like to fix both in 1.11/2.1.

@gibson042 gibson042 closed this in 6a0ee2d Feb 8, 2013
@gibson042
Copy link
Member

Thanks @markraddatz; I made some minor tweaks for style and compression but the fix is all yours!

gibson042 pushed a commit that referenced this pull request Feb 8, 2013
mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants