> 
> error: Uncaught (in promise) TypeError: Cannot read property
>  'push' of undefined error line: " this.name[i].push(arrayData[0]);
>  "
> 
> 
> 

I do not understand since the line before console.log("data is loaded:" + arrayData[0]); is working!

Is it something about async? Can someone please help me out?

Here is my code:

```
 data: {
    name: []
  },
  methods: {
    LoadData: function() {
      console.log("onload fundtion. \n");
      fetch('http://localhost/store/skininfor.txt')
        .then(response => response.text())
        .then((data) => {
          //  console.log(data);
          var textByLine = data.split("\n");
          for (var i = 0; i < textByLine.length; i++) {
            var arrayData = textByLine[i].split(",");
            console.log("data is loaded:" + arrayData[0]);
            if (arrayData[0] !== undefined) {
               this.name[i].push(arrayData[0]);
            }
          }
        });
    },

```