Ddp-server.js custom fix : that works but i don't know why do i need it?

i have a bug from 1.8.1 in ~/<my_project>/.meteor/local/build/programs/server/packages/ddp-server.js

when a subscribed collection have a document added or removed, the ddp message is correctly sent to the client

but if a document is just updated, the Session.sendChanged function (line 544) get fields empty so the ddp message is not sent

i made a fix in SessionDocumentView.changeField (line 302)

i replaced precedenceList.find by a for loop

elt = precedenceList.find(function (precedence) {
  return precedence.subscriptionHandle === subscriptionHandle;
for(var i = 0; i < precedenceList.length; i++) {
        if(precedenceList[i].subscriptionHandle === subscriptionHandle){
                elt = precedenceList[i];

i have no idea why the find do return -1 instead of the correct result, does someone have any clue about this kind of issue ?

i made that fix in a 1.8.2 version = ddp-server@2.3.0

i had a look to how it was in 1.8.0 = ddp-server@2.2.0

elt = _.find(precedenceList, function (precedence) {

i tried it as a fix and it works good too

here is the modification : line 87

any clue why


return -1 knowing that


was returning the good result ?

@nathan_muir ?