ms-seo icon indicating copy to clipboard operation
ms-seo copied to clipboard

SEO incompatible with regular expression routes

Open jdmswong opened this issue 9 years ago • 2 comments

Setting a regular expression path throws this error in console:

Exception from Tracker recompute function:
debug.js:41 Error: Cannot currently resolve a regular expression path
    at Url.resolve (url.js:317)
    at Handler.resolve (handler.js:108)
    at Function.Route.path (route.js:163)
    at Function.Route.url (route.js:171)
    at Function.Router.url (router.js:180)
    at Object.SEO.set (manuelschoebel_ms-seo.js:66)
    at Object.SEO.clearAll (manuelschoebel_ms-seo.js:154)
    at Object.SEO.set (manuelschoebel_ms-seo.js:62)
    at manuelschoebel_ms-seo.js:269
    at Tracker.Computation._compute (tracker.js:323)

Here is my route config:

Router.route(/.*/,{
  name: "home",
  template: "myTemplate"
});

jdmswong avatar Jan 21 '16 22:01 jdmswong

removing the route name prevents the error but throws the warning:

You called Router.url for a route named undefined but that route doesn't seem to exist. Are you sure you created it?

This warning is caused by this package, and isn't generated when the package is removed.

So we have to choose between either naming our routes and throwing an error, or not naming them and throwing a warning. Any way to run this cleanly?

jdmswong avatar Jan 21 '16 22:01 jdmswong

Any update on this issue?

fvpDev avatar Jul 13 '16 02:07 fvpDev