surrealdb / surrealdb.wasm

A WebAssembly engine for the SurrealDB JavaScript SDK
https://surrealdb.com
Apache License 2.0
112 stars 17 forks source link

Bug: ERROR Encountered a non-object value in array #56

Open limcheekin opened 6 months ago

limcheekin commented 6 months ago

Describe the bug

The db.select() and db.delete() throw the error above when the given id is not found.

Steps to reproduce

  1. Add the following code to the development server, index.html:
      const db = new Surreal();
      await db.connect("indxdb://test");
      await db.use({ namespace: "test", database: "test" });
      await db.select("person:1");
  2. Run the development server with command npm run serve.
  3. Access the http://localhost:8000 and you should see the error in developer console of Chrome browser.

Expected behaviour

It should return null or [].

SurrealDB version

1.2.0 and 1.3.0

Contact Details

No response

Is there an existing issue for this?

Code of Conduct