Skip to content

Problems with booleans #45

Closed
Closed
@rulatir

Description

@rulatir

At line 421:

params.push((v === null || v === void 0 || t === 'number' || t === 'string' ? v : v instanceof Blob ? v.valueOf() : v.toString()));

If it is neither null nor 0 nor number nor string but boolean, then the v instanceof Blob condition is evaluated. There is no Blob in React Native (at least on Android), so this throws, but the exception is caught somewhere down the stack and converted to console warning (took a while to notice!) w/o fixing the problem.

Shimming Blob = function(){} seems to quickfix the exception but doesn't really help handle booleans. WebSQL is supposed to be able to store booleans but the code above will probably end up storing strings "true" and "false", which will both evaluate to true to an application that expects actual booleans returned from the database.

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