Skip to content

Commit 8757e07

Browse files
committed
fix: make sure that the element can re-render
1 parent 019c155 commit 8757e07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/test-utils/src/wrapper.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,11 +633,11 @@ export default class Wrapper implements BaseWrapper {
633633
eventObject.keyCode = modifiers[event[1]]
634634
}
635635

636-
// If this element's method has been reset by setMethod, it won't trigger
637-
// Make sure that this element is updated with the latest method
636+
// If this element's event handler has been reset by setMethod, it won't trigger
637+
// Make sure that this element is updated with the latest event handler
638638
if (this.vnode) {
639639
const context = this.vnode.context
640-
context._update(context._render())
640+
if (context.$options.render) context._update(context._render())
641641
}
642642

643643
this.element.dispatchEvent(eventObject)

0 commit comments

Comments
 (0)