Skip to content

SQLite storage fails while querying #7236

Open
@KingSora

Description

@KingSora

Recently we've tried to run our app with the SQLite RxStorage and found an issue when doing a certain query.

The error we are getting is:

Image

While debugging, I've found this to be an issue of this function:

Image

In particular the isPlainObject check is causing the error:

function isPlainObject(e) {
  return "object" == typeof e && e.constructor == Object;
}

The problem here is that if you pass null to this function the e.constructor == Object comparison will fail because typeof null is "object".

This should be fixed by changing the function to:

function isPlainObject(e) {
  return !!e && "object" == typeof e && e.constructor == Object;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions