iron-meteor / iron-router

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

Update no routes template logic #1562

Closed zimme closed 7 years ago

zimme commented 7 years ago

This should fix #1561. It needs to be verified because I’ve only tested that the error in #1561 doesn’t happened and not verified that the logic for noRoutesTemplate actually work.

chrisbutler commented 7 years ago

@zimme i believe you if you say this fixes it, but i can't for the life of me see why

zimme commented 7 years ago

I believe it's the order of notFoundTemplate and noRoutesTemplate.

The only difference here is that we only check if any routes are defined if we don't have a notFoundTemplate defined.

zimme commented 7 years ago

I'll test more later today, to verify the fix.

chrisbutler commented 7 years ago

@zimme are you making your changes in a locally cloned version of the package?

zimme commented 7 years ago

Yes

chrisbutler commented 7 years ago

how weird is this... the package from atmosphere is loading the templates/ folder even though none of it is in package.js... but it doesn't happen if the package is loaded locally

zimme commented 7 years ago

I believe it has to do with the modules system, can't remember where but I thinnk I remember reading that all package files are evaluated to be able to support the modules api or was it lazy loading

chrisbutler commented 7 years ago

but does that account for the difference in behavior between local and atmosphere-installed packages?

oh i think i get it