Skip to content

Query result always in array #18

Closed
@sophiebremer

Description

@sophiebremer

Is your feature request related to a problem? Please describe.
When nothing has been found or the query is malformed, undefined is returned. One can not distinguish between both situations. It also bloats the code to handle undefined results.

Describe the solution you'd like
Malformed query should result in an exception, otherwise query should always return an array. One can test with result[0], if something has been found.

Describe alternatives you've considered
The current solution requires access with optional shorthand or fallbacks.

Additional context
jQuery always returns an array.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions