Why does it not determine whether the parent element exists when inserting a child node, but it does when removing an element? #9241
Unanswered
jeff-wangzhen
asked this question in
Help/Questions
Replies: 2 comments 2 replies
-
<template v-else>
<p v-permission-or="['admin']">else</p>
</template> - <p v-else v-permission-or="['admin']">else</p>
+ <template v-else>
+ <p v-permission-or="['admin']">else</p>
+ </template> |
Beta Was this translation helpful? Give feedback.
1 reply
-
This does cause errors, has been optimized in #9134 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
packages/runtime-dom/src/nodeOps.ts
The
remove
method here will check whether the parent node exists, but theinsert
method will not check.This will cause: If its parent element is reset to null by the business code before executing this line of code, an error will be reported.
demo
I'm not sure if this is a bug, so it's not mentioned in the issue list。
Beta Was this translation helpful? Give feedback.
All reactions