title: Uncaught (in promise) TypeError: Cannot set property of undefined with axios
body: <p>I have this vue.js component that uses axios to retrive a json array of <code>joke</code> objects :</p>
  
  <pre><code>&lt;template&gt;
    &lt;div id="show-jokes-all"&gt;
          &lt;h2&gt;Showing all jokes&lt;/h2&gt;
          &lt;div v-for="joke in jokes"&gt;
                  &lt;h2&gt;{{joke.title}}&lt;/h2&gt;
                  &lt;article&gt;{{joke.body}}&lt;/article&gt;
              &lt;hr&gt;
          &lt;/div&gt;  
  
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import axios from 'axios';
  
      export default {
          name: 'showJokes',
  
        data () {
          return {
              jokes:[]
  
          }
        },
  
        methods: {
  
        },
  
        created() {
          axios.get('http://127.0.0.1:8090/api/jokes).then(function(data){    
         //console.log(data); works fine
          this.jokes = data.body;
          });
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>When I log the result in console it's fine but when I try to put it in <code>jokes</code> array I get</p>
  
  <blockquote>
    <p>Uncaught (in promise) TypeError: Cannot set property 'jokes' of
    undefined</p>
  </blockquote>
  
  <p>This may be a trivial error but as a newbie to vue.js I'm stock on this so appreciate your hints. </p>