Skip to content
Merged
Show file tree
Hide file tree
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 packages/server-test-utils/dist/vue-server-test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ function isDynamicComponent(c) {
}

function isComponentOptions(c) {
return typeof c === 'object' && (c.template || c.render)
return c !== null && typeof c === 'object' && (c.template || c.render)
}

function isFunctionalComponent(c) {
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function isDynamicComponent(c: any) {
}

export function isComponentOptions(c: any) {
return typeof c === 'object' && (c.template || c.render)
return c !== null && typeof c === 'object' && (c.template || c.render)
}

export function isFunctionalComponent(c: any) {
Expand Down
2 changes: 1 addition & 1 deletion packages/test-utils/dist/vue-test-utils.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -1953,7 +1953,7 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler) {
}

function isComponentOptions(c) {
return typeof c === 'object' && (c.template || c.render)
return c !== null && typeof c === 'object' && (c.template || c.render)
}

function isFunctionalComponent(c) {
Expand Down
2 changes: 1 addition & 1 deletion packages/test-utils/dist/vue-test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ function isDynamicComponent(c) {
}

function isComponentOptions(c) {
return typeof c === 'object' && (c.template || c.render)
return c !== null && typeof c === 'object' && (c.template || c.render)
}

function isFunctionalComponent(c) {
Expand Down
2 changes: 1 addition & 1 deletion packages/test-utils/dist/vue-test-utils.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,7 @@
}

function isComponentOptions(c) {
return typeof c === 'object' && (c.template || c.render)
return c !== null && typeof c === 'object' && (c.template || c.render)
}

function isFunctionalComponent(c) {
Expand Down