Skip to content

Sort property not available on objects raises an error #214

@claustres

Description

@claustres

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions