# How to reopen ApplicationRoute

**URL:** https://meta.discourse.org/t/how-to-reopen-applicationroute/53144
**Category:** Development
**Created:** [20 Novembre 2016, 2:00pm UTC](https://meta.discourse.org/t/how-to-reopen-applicationroute/53144 "2016-11-20T14:00:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [20 Novembre 2016, 2:00pm UTC](https://meta.discourse.org/t/how-to-reopen-applicationroute/53144/1 "2016-11-20T14:00:28Z")

</div>

> <https://github.com/hummingbird-me/discourse-hummingbird/blob/master/assets/javascripts/custom_auth.js#L1>

I also wanted the same functionality for my plugin to reopen `ApplicationRoute`. But it always fail with error `Uncaught TypeError: Cannot read property 'reopen' of undefined(…)(anonymous function) @ javascripts/custom_auth:1(anonymous function) @ plugin-third-party.js:7`. Can anyone help me what is wrong in it.

Also I installed the above mentioned hummingbird plugin in my development env. That one also not working ☹ (javascript part)

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [20 Novembre 2016, 2:27pm UTC](https://meta.discourse.org/t/how-to-reopen-applicationroute/53144/2 "2016-11-20T14:27:05Z")

</div>

I don’t think ApplicationRoute is defined on the Discourse window object. Have you tried

```plaintext
import ApplicationRoute from 'discourse/routes/application';

```

?

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [20 Novembre 2016, 6:45pm UTC](https://meta.discourse.org/t/how-to-reopen-applicationroute/53144/3 "2016-11-20T18:45:07Z")

</div>

thank you. it’s working 👍

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [20 Novembre 2016, 10:30pm UTC](https://meta.discourse.org/t/how-to-reopen-applicationroute/53144/4 "2016-11-20T22:30:33Z")

</div>


