Skip to content

Commit

Permalink
Improve conditional to check comments inside component (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
dxvladislavvolkov authored Jun 19, 2023
1 parent 0399e2e commit 72e5e27
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/devextreme-vue/src/core/vue-helper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
App,
Comment,
ComponentPublicInstance,
createApp,
Slot,
Expand Down Expand Up @@ -174,9 +175,7 @@ function hasInlineTemplate(children: VNode[]): boolean {
}

function isComment(node) {
const nodeType = node.type;
const type = typeof nodeType === "symbol" ? nodeType.toString() : nodeType;
return type === "Symbol(Comment)" || (type === "Symbol()" && !node.children);
return node.type === Comment || (node.type.toString() === "Symbol()" && !node.children);
}

function isConfiguration(child): boolean {
Expand Down

0 comments on commit 72e5e27

Please sign in to comment.