Uncaught (in promise) TypeError: Cannot read properties of null (reading ‘brands)

We often encounter this kind of error when writing vue projects. Error: Uncaught (in promise) TypeError: Cannot read properties of null (reading 'brands') This sentence means: Cannot read null properties (reading 'brands' )

 The solution is to add a v-if to the place where rendering is required to determine the existence of the data as shown below

Done!

Guess you like

Origin blog.csdn.net/qq_59294119/article/details/130391247