possible race condition, if the localforage takes time to fetch the data and the request finishes first.