Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@click producing Uncaught ReferenceError: _cache is not defined #4327

Closed
LiamWiddop opened this issue Aug 13, 2021 · 2 comments
Closed

@click producing Uncaught ReferenceError: _cache is not defined #4327

LiamWiddop opened this issue Aug 13, 2021 · 2 comments
Labels
has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working scope: compiler

Comments

@LiamWiddop
Copy link

LiamWiddop commented Aug 13, 2021

Version

3.2.2

Reproduction link

Link here

Steps to reproduce

Declare @click in an element tag after a bound class declaration (e.g. :class={classname:true})

What is expected?

Allows for click events in the same manner as v-bind:click, or if the @click was declared in other locations of the tag

What is actually happening?

Error is thrown: Uncaught ReferenceError: _cache is not defined


I'm not sure why, but this error only arises when @click is declared after a bound class declaration. As outlined in the playground, some exceptions include:

  1. The @click event comes before the class declarations
  2. The class does not recruit a bind
  3. Other mouse events are used - such as mousedown
  4. If v-bind:click is used instead

I'm not sure if this is my error, or if something's going wrong - thanks in advance!

@edison1105 edison1105 added 🐞 bug Something isn't working scope: compiler has workaround A workaround has been found to avoid the problem labels Aug 13, 2021
@edison1105
Copy link
Member

works fine in v3.1.x

@njzzzz
Copy link

njzzzz commented Aug 13, 2021

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working scope: compiler
Projects
None yet
4 participants
@edison1105 @LiamWiddop @njzzzz and others