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

Fix #20 #33

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/TargetContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default Vue.extend({
const nodes = this.updatedNodes && this.updatedNodes()
if (!nodes) return h()
return nodes.length < 2 && !nodes[0].text
? nodes
? h(nodes[0].tag, nodes[0].data, nodes[0].children)
Copy link
Owner

Choose a reason for hiding this comment

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

Hi! So as I just explained in #20, I can't reproduce this locally, which might be due to the version of Vue I'm using vs. people reporting this issue.

Nonetheless, it would be more correct to simply return the single node like this:

Suggested change
? h(nodes[0].tag, nodes[0].data, nodes[0].children)
? node[0]

Can you verify wether this works for you?

Copy link
Author

@mpbarlow mpbarlow Mar 7, 2020

Choose a reason for hiding this comment

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

Hello! Thank you for getting back to me.

In the latest version of Vue, this issue appears to no longer be occurring. Unfortunately, even though I went back to the version that was current at the time I opened the PR (2.6.9), and then to 2.6.8, I can't replicate it there anymore either.

I do remember that just returning the single node (as per your suggested change) didn't work, because it was the first thing I tried and I couldn't understand why (or why wrapping its data in a call to h() did work).

I'm sorry I can't be more help!

: h(this.tag || 'DIV', nodes)
},
destroyed() {
Expand Down