derbyjs / racer

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

Immediate events break derby since racer 0.6.0-alpha43 #236

Closed minicuper closed 3 months ago

minicuper commented 8 years ago

in alpha42 the test works well

  describe.only('positive feedback because of Immediate events', function(){
    it.only("should not get <Cannot read property 'fromSegments' of undefined> bug", function(done) {
      var model = (new Model).at('_page');

      model.ref('b', 'a');
      model.ref('c', 'a');

      model.on('change', 'b', function() {
        model.removeRef('c');
      });

      model.on('change', 'c', function(value) {
        if (value === 1) done();
      });

      model.set('a', 1);
    });
  });

but since alpha43 racer throws the error

That is not a synthetic test case. I saw the bug in derby. It happens when a model event remove some components (which have refs to the event path) from the page.

The commit is the reason - https://github.com/derbyjs/racer/commit/8a056a3e8f7b06c347c82cb08ff584406b4fe052

craigbeck commented 3 months ago

Thanks for your contributing your issue.

We have recently been actively updating the Derby and Racer packages, and both repos are now in Typescript and published with types on npm. As we have quite a few old issues open we have made the decision to close out of date issues.

If this issue still matters to you we encourage reproducing against the current versions of the repo and opening a new issue.