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

fix(utils): Only call callback if type(callback) == "function" #2038

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

iguanacucumber
Copy link

Sometimes the cursor freezes for a second and i get a error popup:

Error executing lua callback: ....../event.lua:47: attempt to call local 'callback' ( a table value ) 
Stack traceback:
....

so i fixed this, it's only a 3 line change

@max397574
Copy link
Contributor

i don't know what caused this issue (shouldn't happen)
but either way it makes way more sense to just make this a type(callback)=="function" check

@iguanacucumber iguanacucumber changed the title fix(utils): Do not call callback if type(callback) == "table" fix(utils): Only call callback if type(callback) == "function" Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants