Jump to content

Recommended Posts

Posted (edited)

Hello everybody.

Today I encountered such a problem, put the client on the VUE JS and I get an error when compiling the front

in console: error 'mp' is not defined no-undef

How can I connect the Rage API to my Vue JS application?

Thanks.

Edited by BabySmurf
  • 5 months later...
Posted

Check if window.mp is defined before calling the functions that's part of it. if(window.mp) mp.trigger('event')

Another approach, if window.mp is undefined, create global variable called mp and assign it dummy functions.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...