When using element UI in Vue project, an error is reported: [Vue warn]: error in nexttick: "typeerror: cannot read property 'map' of null"
The error message is as follows:
It’s ridiculous. I studied it myself and recorded it. It’s all the fault of carelessness:
The reason is that the data source of El table is initially set to null. When the default sort attribute is used, the table will map the data source by default and report an error
change currentpagedata: null
to currentpagedata: []
.
Resolution process:
Locate the error location 10051 line according to the error information:
array.map reports the error as null, and then locate the array up:
according to the parameters and contents of this method, it is basically determined that the error information is caused by the default sort attribute of El table, that is, the data source array of El table during compilation and sorting is null
looking back at the data source, I found that the data source was initially assigned null. No wonder
change the initial value of the data source array to [] empty array.
Itself is a very simple mistake, but I didn’t expect it.
Read More:
- Uncaught TypeError: Cannot read property ‘replace’ of null
- Vue error in render: “typeerror: cannot read property ‘name’ of undefined”
- Uncaught typeerror: cannot set property ‘of null error resolution
- Error in created hook: “typeerror: cannot read property ‘cm’ of undefined”
- Error in mounted hook: “TypeError: Cannot read property ‘init‘ of undefined“
- Using pop-up window and I18N, error in render: “typeerror: cannot read property” appears_ T ‘of undefined’ solution
- [Solved] Vue Error: TypeError: Cannot read property ‘end‘ of undefined
- TypeError: Cannot read property ‘username‘ of undefined
- TypeError: Cannot read property thisCompilation of undefined
- Datatable plug-in error: uncaught typeerror: cannot read property ‘style’ of undefined
- In Vue, use echorts to report an error: “typeerror: cannot read property ‘init’ of undefined” error reporting reason and solution
- Vue error resolution: TypeError: Cannot read property’_t’ of undefined”
- [Solved] Syntax Error: TypeError: Cannot read property ‘parseComponent‘ of undefined
- Vue error resolution: typeerror: cannot read property ‘_ t’ of undefined”
- SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
- Easynvr operation log reports an error. Fatal error: concurrent map read and map write troubleshooting
- In Struts2, the value read from the foreground JSP page is null
- [Vue warn]: Error in render: “TypeError: Cannot read properties of undefined
- Cannot read property ‘this compilation’ of undefined appears in copy webpack plugin
- Cannot read property ‘substring’ of undefined in Vue