Skip to content

Database.open: callback not called if mode is undefined #1697

Open
@tguichaoua

Description

@tguichaoua

Issue Summary

In the code bellow if mode is set to undefined the callback is never called.
I expected that both code are equivalent.

  const db = new sqlite3.Database(":memory:", undefined, () => {
    console.log("1"); // not called
  });
  const db2 = new sqlite3.Database(":memory:", () => {
    console.log("2"); // called
  });

Steps to Reproduce

See summary

Version

5.1.6

Node.js Version

18.15.0

How did you install the library?

npm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions