deepstreamIO / deepstream.io-client-js

The Browser / Node.js Client for deepstream.io
Other
294 stars 109 forks source link

record subscription interference #522

Closed kristofkalocsai closed 4 years ago

kristofkalocsai commented 4 years ago

The issue outlined in #499 and #496 still lingers.

Apparently the callback invokes if it was subscribed to a path pointing to an object each time any path of the record changes.

Demo: https://codesandbox.io/s/recordsubscribe-m9g4p

Please try running src/client-object.js and src/client-value.js from the terminal.

Also the problem seems to be rooted in the !== comparison (as pointed out by @hhanh00 and @KrishnaPG) in https://github.com/deepstreamIO/deepstream.io-client-js/blob/b542d068bcb46ac9028727fc691fbd04b86dafcc/src/record/record-core.ts#L756-L758

Prepared a PR with the changes proposed by them: #523 This seems to fix this issue. Do you have any metrics to measure performance impact?

yasserf commented 4 years ago

Can you confirm this works for you now? Thanks!

jaime-ez commented 4 years ago

Hi, this seems to be fixed. I'm closing for now. Feel free the reopen if problem persists.