-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
correction when nodeOps.tagName returns value other than string #11332
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
base: dev
Are you sure you want to change the base?
Conversation
Can you provide a reproduction of the bug you are fixing? |
@@ -5899,7 +5899,7 @@ function createPatchFunction (backend) { | |||
} | |||
|
|||
function emptyNodeAt (elm) { | |||
return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm) | |||
return (typeof nodeOps.tagName(elm) == "string") ? new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm) : new VNode("", {}, [], undefined, elm) |
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.
could be rewritten as
return (typeof nodeOps.tagName(elm) == "string") ? new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm) : new VNode("", {}, [], undefined, elm) | |
return new VNode((typeof nodeOps.tagName(elm) == "string") ? nodeOps.tagName(elm).toLowerCase() : '', {}, [], undefined, elm) |
I have an application using Nuxt 2.12.2 and Vue 2.6.11, for some reason
when adding the vue-chartjs the application crashes and presents the error
attached just the function in which I sent the bugfix, when making the
change I sent in PR the error stopped occurring
Em ter., 21 de abr. de 2020 às 04:59, Eduardo San Martin Morote <
notifications@github.com> escreveu:
… Can you provide a reproduction of the bug you are fixing?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11332 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHKNLQRFHGM3N4ILHNK2Y63RNVG5DANCNFSM4MM6YTLQ>
.
--
Att. André Ferreira
andrehrf@gmail.com
Tel: (21) 99992-6932
|
I understand you are trying to fix a problem you find in your code but I'm asking you for a boiled down reproduction or at the very least a test case that fails without the proposed change. Otherwise, we won't be able to accept the change You can use https://jsfiddle.net/chrisvfritz/50wL7mdz/ or https://codesandbox.io/s/vue to create a boiled down reproduction (no extra dependencies like Nuxt) BTW dist and packages files are generated and should be excluded from the PR. |
Hello Eduardo, I don't know how to answer this bug because it occurs
intermittently, in production mode it works normally, but when I'm using
nuxt in dev mode when making any changes the error I sent appears, I
believe it may be an error from nuxt and not from vue, I take an hour to
thoroughly investigate which plugin may be causing this behavior, for now
what I could do to resolve it was the change I sent, which is even a simple
error to use toLowerCase without being sure that the returned value is in
fact a string, not accepting such a simple correction does not make much
sense
Em qua., 22 de abr. de 2020 às 04:01, Eduardo San Martin Morote <
notifications@github.com> escreveu:
… I understand you are trying to fix a problem you find in your code but I'm
asking you for a boiled down reproduction or at the very least a test case
that fails without the proposed change. Otherwise, we won't be able to
accept the change
You can use https://jsfiddle.net/chrisvfritz/50wL7mdz/ or
https://codesandbox.io/s/vue to create a boiled down reproduction (no
extra dependencies like Nuxt)
BTW dist and packages files are generated and should be excluded from the
PR.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11332 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHKNLQXYL3G57UJVH3DA3HDRN2I6LANCNFSM4MM6YTLQ>
.
--
Att. André Ferreira
andrehrf@gmail.com
Tel: (21) 99992-6932
|
The reproduction is essential to understand if this is the right fix or not. The problem could be elsewhere leading to |
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch for v2.x (or to a previous version branch), not themaster
branchfix #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information: