ahmedsaoud31 / laravel-permission-to-vuejs

Laravel Permission Package To Use it in VueJs
96 stars 30 forks source link

Missing Initial Variable in main.js (README.MD) #17

Closed SirCoolMind closed 12 months ago

SirCoolMind commented 12 months ago

This problem arise if developer do not want to put fetch permission inside main.js So what they need to do is to declare below code inside their main.js

//// Ensure window.Laravel.jsPermissions is defined with a default value
window.Laravel = window.Laravel || {};
window.Laravel.jsPermissions = window.Laravel.jsPermissions || { permissions: 0, roles: 0 };
ahmedsaoud31 commented 12 months ago

Thanks, i'll update this in index.js file.

ahmedsaoud31 commented 12 months ago

Update this in npm version @3.0.2