cap-js / cds-dbs

Monorepo for SQL Database Services for CAP
https://cap.cloud.sap/docs/
Apache License 2.0
37 stars 11 forks source link

fix: wrap values in array if it is object, so it can be spreaded #882

Closed SamuelBrucksch closed 4 days ago

SamuelBrucksch commented 3 weeks ago

A query with no properties remaining caused a TypeError earlier, as we try to destructure an object:

Uncaught TypeError: Found non-callable @@iterator

So if it is wrapped as array, the TypeError does not exist anymore.