# Code example not work

**URL:** <https://staging-discuss.dev.twitch.com/t/code-example-not-work/27499>\
**Category:** Extensions\
**Created:** [August 4, 2020, 1:39pm UTC](https://staging-discuss.dev.twitch.com/t/code-example-not-work/27499 "2020-08-04T13:39:14Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 4, 2020, 1:45pm UTC](https://staging-discuss.dev.twitch.com/t/code-example-not-work/27499/4 "2020-08-04T13:45:25Z")

</div>

onChanged will execute if you have the config service enabled.

But the

`if (global_config) {` will only trigger if `window.Twitch.ext.configuration.global` is not undefined.

> [@Required Configuration using Service Configuration Extension](https://staging-discuss.dev.twitch.com/t/required-configuration-using-service-configuration-extension/27460/6):
>
> is an example of loading config. Substiute `global` as needed

As I covered in the _other_ thread where I linked this example, you need to substitute `global` for the other config segments, depending on which segment you are storing the config you wish to recall in

---

_[View the full topic](https://staging-discuss.dev.twitch.com/t/code-example-not-work/27499)._
