tmeasday / meteor-router

MIT License
366 stars 76 forks source link

Filters crash silently, if no return is given. #100

Open Sivli-Embir opened 11 years ago

Sivli-Embir commented 11 years ago

I foolishly forgot to return page inside of a filter and the Chrome tab on OS X would completely hang and fail to quit. So much so that I required a few OS level restarts before I found my issue.

Will hang Chrome, possible other browsers as well.

Meteor.Router.filters({
'someFilter': function (page) {
    //return page;
  }
});

Works like a charm.

Meteor.Router.filters({
'someFilter': function (page) {
    return page;
  }
});

This is not a major issue but you may want to add a warning. Would be great if you could throw an exception when this happens.

Cheers.