iron-meteor / iron-router

A client and server side router designed specifically for Meteor.
MIT License
1.98k stars 412 forks source link

Navigating to an undeclared route triggers a page refresh #1135

Open gwendall opened 9 years ago

gwendall commented 9 years ago

Navigating to an undeclared route reloads the page to render the notFoundTemplate instead of rendering it on the client-side. Reproduction here: http://iron-bug.meteor.com

gwendall commented 9 years ago

Ended up hacking it as below.

Meteor.startup(function() {
  Router.route("/(.*)", {
    name: "notFound",
    template: "notFound",
    action: function () {
      this.render();
    }
  });    
});