[Vue warn]: Error in render: “TypeError: Cannot read property ‘username‘ of null“ found in

[Vue warn]: Error in render: “TypeError: Cannot read property ‘username’ of null”

found in

TypeError: Cannot read property ‘username’ of null
at Proxy.render (eval at ./node_modules/cache-loader/dist/cjs.js?{“cacheDirectory”:“node_modules/.cache/vue-loader”,“cacheIdentifier”:“75ae2b2e-vue-loader-template”}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/head.vue?vue&type=template&id=e089b420&scoped=true& (0.js:59), :11:52)
[Vue warn]: Error in render: “TypeError: Cannot read property ‘username‘ of null“ found in
渲染错误:“TypeError:不能读取属性’username’的null”
中发现的

解决方法:加了v-if 有就渲染[Vue warn]: Error in render: “TypeError: Cannot read property ‘username‘ of null“ found in