feathersjs-ecosystem / feathers-reactive

Reactive API extensions for Feathers services
MIT License
216 stars 37 forks source link

Hook generating patched/updated event before created event generates doublons #182

Closed claustres closed 2 years ago

claustres commented 2 years ago

Steps to reproduce

Add a create after hook on a service which performs a patch/update on the result object to add some properties (eg createdAt).

Expected behavior

The reactive data should not contains doublons.

Actual behavior

The updated item list contains the same object twice.

Problem is probably here, where the patch should not concat if no matching object is found, or here where the create should not concat if an already matching object is found.

System configuration

Tell us about the applicable parts of your setup.

Module version): 0.8.1

NodeJS version: 12