feathers-reactive icon indicating copy to clipboard operation
feathers-reactive copied to clipboard

Sort property not available on objects raises an error

Open claustres opened this issue 2 years ago • 0 comments

Steps to reproduce

Use a sort query referring a property which is not retrieved in the target objects, ie the property does exist in the database but is discarded for the client or not selected with $select.

Expected behavior

Reactivity should work fine.

Actual behavior

An error is raised and breaks reactivity: TypeError: Cannot read properties of undefined (reading 'name') at eval (feathers-reactive.js:1555:1).

It appears that the sorter does not check if the property is available on the target object when accessing it.

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working): 0.10

NodeJS version: 16

Operating System: Debian

claustres avatar Aug 03 '23 15:08 claustres