# Override function in /app/assets/javascripts/discourse/app/lib/

**URL:** https://meta.discourse.org/t/override-function-in-app-assets-javascripts-discourse-app-lib/261985
**Category:** Development
**Created:** [April 17, 2023, 6:20pm UTC](https://meta.discourse.org/t/override-function-in-app-assets-javascripts-discourse-app-lib/261985 "2023-04-17T18:20:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [April 17, 2023, 6:20pm UTC](https://meta.discourse.org/t/override-function-in-app-assets-javascripts-discourse-app-lib/261985/1 "2023-04-17T18:20:15Z")

</div>

I need to override a function in a file in /app/assets/javascripts/discourse/app/lib/ in a plugin or theme component. It’s a controlled environment so it does not matter if it’s a bit of a hack. How can I approach this best?
