current position:Home>[Vue] front end error: cannot read properties of undefined (reading 'split')
[Vue] front end error: cannot read properties of undefined (reading 'split')
2022-05-15 02:10:18【Triumph-light】
The emergence of problems :
Because when doing the project , Want to convert numbers into Chinese characters :
But there will be a report on the console Cannot read properties of undefined (reading ‘split‘)
When debugging, it is found that the data will appear slowly
The cause of the problem :
Because it's a request to get this studentinfo This data , So before we get the data , It will be for undefined, There is no way to use it at this time .
In short, it is the problem of data asynchrony .
solution :
When the data is undefined When , Remove this , When it's not for undefined When it's time to execute , So add a if Sentence to judge
copyright notice
author[Triumph-light],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/132/202205120526195658.html
The sidebar is recommended
- Educoder web programming foundation autumn 2021 - HTML5 - text control class label
- Educoder web programming foundation autumn 2021 - HTML5 document header tags and attributes
- Educoder web programming foundation autumn 2021 - HTML5 - text control class label
- Educoder web programming foundation autumn 2021 - overview of web front end development
- Vue data broker
- HTML5 notes - new specifications and new elements
- Lunch break train & problem thinking: on multidimensional array statistics of the number of elements
- Children's Painting Tutorial | children's interesting art lesson "firecrackers say goodbye to the old year and fireworks greet the new year"
- LeetCode 713. Subarray with product less than k
- JavaScript programming training Day6
guess what you like
Vue realizes two-level linkage
Tengine uses brotli to turn on tls1 3 and optimize HTTPS access speed
C + +: remove the specified element from the array
C + +: main elements
Learn about nginx and tomact
IC workplace Theory -- feelings of senior brother of digital ic front-end design after 4 months of employment (Part I)
Vue Chapter 3 scaffolding's most complete render function, props, mixin mixing, plug-ins, browser local storage, component customization events_ Binding, unbinding, global event bus, message subscription and publishing, nexttick, Vue transition and animat
Vue Chapter 5 vuex creates and introduces the use of store, getters and four map methods
***************2、 JS + Vue js***************
A detailed explanation of HTTP protocol + classic interview questions
Random recommended
- Vue Chapter 4 Ajax in Vue: cross domain problems and slot slots
- Online nginx does not support the bug record of error reporting in delete request
- Okhttp sets the public parameters and puts the JSON object into the @ body to request the configuration of the public parameters
- Fluent ignores authentication of HTTPS and WSS certificates
- Browser loading HTML page evokes the most complete strategy of APP in mobile phone
- HTTP status code 304 and Etag details
- Using angularjs for fuzzy dynamic search drop-down box content
- Seamless connection to Macao, Hengqin Island, which is beautiful beyond the sky, is on fire again
- JQuery framework
- Vue mouse down and move event
- A simple Vue answer demo, single choice and multiple choice
- Front end interview question: if the cell in the table is red, click it to turn into white; if it is white, click it to turn into red, and what is not clicked is white
- Vue packaging folding panel plus animation effect
- If the front-end does real-time data acquisition?
- Ant vue3 table sorted by time
- Vue local refresh iframe
- Vue instruction authority
- Vue iframe refresh remains on the original page
- Vue realizes Gaode map API mask, positioning and weather
- Comparison and implementation of bidirectional data binding between react and Vue
- React error report record
- Analysis of react life cycle function
- react demo1 TodoList
- Summary of the differences between state and props in react
- Difference between controlled components and uncontrolled components in react
- Node. JS use get Stream download file
- How does JavaScript copy arrays instead of references
- JavaScript calculates the number of days, hours, minutes and seconds between days
- JQuery get page address parameters
- JavaScript create Download
- node. JS traversal directory
- Tips for using JavaScript string split (how to keep the delimiter)
- Common CSS notes
- JavaScript usage Get the address of the regular function
- New generation node JS web development framework koa zero foundation entry learning notes
- JavaScript notes
- asp. Net core method for modifying HTML without rerun
- Summary of compatibility processing of H5 + Vue cli project in Safari browser
- Summary of amap scheme of Gaode map used in vue3 + TS project
- Summary of filter scheme used in JS code in Vue