Reputation: 6666
I'm new to vue and I've been trying to solve this warn in my console about Cannot read property of null. I tried to put a default value in my props but no luck. I can get the value inside :condition
but inside the console it shows warning can't read property of null
props: ['user']
Inside heading component:
<header-tooltip :total="total" title="High Paying Cash Surveys" :user="user" :condition="user.hpcs" :currency="currency" placeholder="0"></header-tooltip>
Warn:
[Vue warn]: Error when evaluating expression "user.hpcs": TypeError: Cannot read property 'hpcs' of null (found in component: <heading>)
Upvotes: 0
Views: 2045
Reputation: 6666
Finally got an answer from reading the vue.js silent api docs.
These guy will erase all the vue logs and warnings if we wanted our app in production state. Other method is if we install vue via npm
then we should include the minified vue script inside our blade. Using minified will prevent warnings and logs inside your vue and it's good for production purposes.
Locate your vue js and enter the code below:
Vue.config.silent = true
Upvotes: 1