Skip to content

event modifier breaks if handler is undefined #9865

@theoephraim

Description

@theoephraim

Vue version

3.3.12

Link to minimal reproduction

https://play.vuejs.org/#eNqNUk1PGzEQ/SvGl7QSuxblFi1RWoTU9tBWBYmLL2F3khj8JXu8RFrtf2fsFSGJEOJmz3sz897MDPy793WfgM95E9ugPLIImPxCWmW8C8gGFmDNRrYOzrAZUWfSSts6G5GZuGFXGf8y+wlaO3bvgu7OZl8zpRFTQSpFHwTj9QqBfow124vFMJT0cWwE/UpUWZ+Q9ZVxHegryQmXnIkJfEiIzrJlq1X7VPsAPVgkUrIdrJWFTvLFdcaYgbNGTHRKbcRBa37OMZL2tdrUj9FZsj3k6pK3znilIfz1qMib5HNWkIytyNrz7xLDkOD8Nd5uoX16J/4Ydzkm+b8AEUIPku8xXIUN4ATf3P6BHb33IBlPmtgfgP8hOp2yxon2g/yT7ANeUfurLE/ZzV282SHY+GoqC83MsfAlp4Vef2D9Te5lfVnypB1pitNxVGblT+Y4AcdFqMckdovo41yItrOURktWfagtoLDeiCXRREgWlYGqc2ZJHeuLb6JTEQ/jNURTPQT3TKOlO3AdlTqwn6uUoYcqAN1GyMP5XPOTtCMBJ9iRiNx/P5vxBXr5H20=

Steps to reproduce

Use an event modifier (like .prevent on a click event that has an undefined handler - for example @click.prevent="undefined"

While that may seem silly, something like @click.prevent="myModalRef?.open()" is totally reasonable and can result in the same thing...

What is expected?

no crash. Probably @click.prevent should still prevent default behaviour...

What is actually happening?

page crashes, with error Cannot read properties of undefined (reading '_withMods')

System Info

No response

Any additional comments?

PS - the new issue wizard thing broke.. I got the "Issue Preview" screen, but then it just kept kicking me back to the native "new issue" button on github.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy