react-native-store icon indicating copy to clipboard operation
react-native-store copied to clipboard

getting null on DB.MYDB.find()

Open mschipperheyn opened this issue 9 years ago • 0 comments

I'm getting null when I run find() against a new database. I'm wondering if this is correct?

In line with most db management systems, results should never return null but rather, in case there is no result, an empty array.

const DB = {
   USERTABLE : Store.model("Users")
}

export function loadUser(userId){

  return dispatch => {

    return DB.USERTABLE.find()
      .then(users => { //users is null

mschipperheyn avatar May 14 '16 18:05 mschipperheyn