# Error when adding slug routes

**URL:** <https://forums.bitovi.com/t/error-when-adding-slug-routes/741>\
**Category:** Uncategorized\
**Created:** [October 31, 2017, 1:38pm UTC](https://forums.bitovi.com/t/error-when-adding-slug-routes/741 "2017-10-31T13:38:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rehat101](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@rehat101](https://forums.bitovi.com/u/rehat101)\
**Post date:** [October 31, 2017, 1:38pm UTC](https://forums.bitovi.com/t/error-when-adding-slug-routes/741/1 "2017-10-31T13:38:11Z")

</div>

I’m trying to add slug routes in the `index.stache`

```auto

      {{#case "login"}}
        <nl-login/>
      {{/case}}

      {{#case "clients"}}
        {{#routeCurrent slug='new'}}
          New page
        {{/routeCurrent}}
      {{/case}}

      {{#case "settings"}}
        <nl-settings/>
      {{/case}}

```

I’m getting the following error in the console

`Cannot read property 'add' of undefined`

I’ve tried uncommenting the code and reverting back but I get on that error.

---

<div class="post-metadata">

**Author:** ![chasen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/chasen/32/402_2.png) [@chasen](https://forums.bitovi.com/u/chasen)\
**Post date:** [October 31, 2017, 9:20pm UTC](https://forums.bitovi.com/t/error-when-adding-slug-routes/741/2 "2017-10-31T21:20:04Z")

</div>

Hi @rehat101,

Could you post the stack trace where you see that error?

All the `#case` statements are inside of a [#switch](https://canjs.com/doc/can-stache.helpers.switch.html), right?
