derbyjs / racer

Realtime model synchronization engine for Node.js
1.18k stars 116 forks source link

Set path when useEventObjects: true #282

Closed pypmannetjies closed 3 years ago

pypmannetjies commented 3 years ago

This showed up while testing the event-listener-tree changes.

NOTE: This PR is just to merge into the other branch, but I wanted to make it super visible for review purposes.

It seems as if with the new changes, we no longer support using useEventObjects: true with no path provided as an argument. In the calling code I was testing, I was able to work around the issue by adding the ** path argument.

A failing test has been added here which passes with the new check I added.

I'm not sure this is the cleanest solution. Not being very familiar with this code, I am open to suggestions!