kadirahq / fast-render

Render you app even before the DDP connection is live. - magic?
MIT License
560 stars 80 forks source link

forward slash error with path array inside IronRouter #144

Open markvandop opened 8 years ago

markvandop commented 8 years ago

path: ['/legal'] = bad path: ‘/legal’ = good

This is an issue in IR when I have pages like path: ['/legal', '/legal/:_id']

Error: Error: path (/legal) must begin with a leading slash "/" at Object.route (packages/meteorhacks_fast-render/packages/meteorhacks_fast-render.js:178:1) at handleRoute (packages/meteorhacks_fast-render/packages/meteorhacks_fast-render.js:646:1) at packages/meteorhacks_fast-render/packages/meteorhacks_fast-render.js:597:1 at Array.forEach (native) at processRoutes (packages/meteorhacks_fast-render/packages/meteorhacks_fast-render.js:594:1) at /Users/markvandop/Desktop/employer.resume.com/.meteor/local/build/programs/server/boot.js:249:5

arunoda commented 8 years ago

We only support paths starting with /. We don't support paths with arrays. I didn't know that was a feature anyway.

arunoda commented 8 years ago

If you like, you can work on a fix. Here's the place to start: https://github.com/kadirahq/fast-render/blob/master/lib/server/iron_router_support.js