title: Not able to retrieve object properties when looping through objects in indexedDB
body: <p>I am not able to retrieve properties when looping through objects stored in indexedDB. When i attempt to get objects trough <code>tasksStore.get(i);</code>, i get the error <code>Cannot read property 'property' of undefined at IDBRequest.getTasks.onsuccess</code>, however, if I change it to <code>tasksStore.get(1);</code>, it works fine, and gets object with id=1 x index's length.</p>
  
  <p>I've tried checking the typeof of both ways, and they both return number. </p>
  
  <pre><code>//success handler on connection
      request.onsuccess = function(e) {
          db = request.result;
  
          //define store index
          tasksStore = tasksTx.objectStore("tasksStore");
  
          //error handler on result of the request
          db.onerror = function(e) {
              console.log("ERROR " + e.target.errorCode);
          }
  
          //variable for counting objects in the index
          let amountOfTasks = tasksIndex.count();
  
          //error handler
          amountOfTasks.onerror = function() {
              console.log("There was an error finding the amount of tasks")
          }
  
          //success handler
          amountOfTasks.onsuccess = function() {
              for (var i = 1; i &lt; amountOfTasks.result; i++) {
                  let getTasks = tasksStore.get(i);
  
                  let getTasksElementContainer = document.getElementById("list-tasks");
                  let createTasksList = document.createElement("li");
                  createTasksList.id = "task-" + i;
  
                  getTasks.onerror = function() {
                      console.log("There was an error looping through the tasks")
                  }
  
                  getTasks.onsuccess = function() {
                      console.log(getTasks.result.title); //getTasks.result works, getTasks.result.title does not.
                      getTasksElementContainer.appendChild(createTasksList);
                      //JSON stringify to return object in string format, and not [Object object]
                      createTasksList.innerHTML = JSON.stringify(getTasks.result.title);
                  }
              }   
          }
      }
  </code></pre>