# Using modifyClass to change core behavior

**URL:** https://meta.discourse.org/t/using-modifyclass-to-change-core-behavior/262064
**Category:** Developer Guides
**Created:** [April 18, 2023, 10:24am UTC](https://meta.discourse.org/t/using-modifyclass-to-change-core-behavior/262064 "2023-04-18T10:24:36Z")
**Posts on this page:** 1
**Showing post:** 21

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [March 10, 2025, 12:47pm UTC](https://meta.discourse.org/t/using-modifyclass-to-change-core-behavior/262064/21 "2025-03-10T12:47:10Z")

</div>

If both plugins are installed and enabled, it should work with no problems. If the target isn’t installed/enabled, you’ll get a warning in the console. But you can use the [`ignoreMissing` parameter](https://github.com/discourse/discourse/blob/99038372804bc01d277fe3557727aa59ce38d475/app/assets/javascripts/discourse/app/lib/plugin-api.gjs#L273C5-L283C6) to silence that.

```plaintext
api.modifyClass(
  "component:some-component",
  (Superclass) => ...,
  { ignoreMissing: true }
);

```

Of course, standard `modifyClass` advice still applies: it should be a last resort, and it can break at any time so you should ensure your testing is good enough to identify issues quickly. Using [transformers](https://meta.discourse.org/t/using-transformers-to-customize-client-side-values-and-behavior/349954) would be a much safer strategy.

---

_[View the full topic](https://meta.discourse.org/t/using-modifyclass-to-change-core-behavior/262064)._
