# TypeError: Discourse.Dialect.postProcessText is not a function

**URL:** <https://meta.discourse.org/t/typeerror-discourse-dialect-postprocesstext-is-not-a-function/49963>\
**Category:** Development\
**Created:** [September 10, 2016, 10:35am UTC](https://meta.discourse.org/t/typeerror-discourse-dialect-postprocesstext-is-not-a-function/49963 "2016-09-10T10:35:15Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [September 10, 2016, 5:40pm UTC](https://meta.discourse.org/t/typeerror-discourse-dialect-postprocesstext-is-not-a-function/49963/5 "2016-09-10T17:40:49Z")

</div>

Okay, so I removed that register\_asset line and then I added

```plaintext
        helper.whiteList([
                'span.ohi-ana',
                'span.ohi-bastion',
                'span.ohi-dva',
                'span.ohi-genji',
                'span.ohi-hanzo',
                'span.ohi-junkrat',
                'span.ohi-lucio',
                'span.ohi-mccree',
                'span.ohi-mei',
                'span.ohi-mercy',
                'span.ohi-pharah',
                'span.ohi-reaper',
                'span.ohi-reinhardt',
                'span.ohi-roadhog',
                'span.ohi-soldier76',
                'span.ohi-sombra',
                'span.ohi-symmetra',
                'span.ohi-torbjorn',
                'span.ohi-tracer',
                'span.ohi-widowmaker',
                'span.ohi-winston',
                'span.ohi-zarya',
                'span.ohi-zenyatta'
        ]);

```

after and inside your setup method

```plaintext
	helper.postProcessText(function (text) {
		text = [].concat(text);
		for (var i = 0; i < text.length; i++) {
			if (text[i].length > 0 && text[i][0] !== "<") {
				text[i] = formatOverwatchHeroNames(text[i]);
			}
		}
		return text;
	});

```

Output after changes

 ![](https://global.discourse-cdn.com/meta/original/3X/0/6/06a35e3d59f99709dfa253618e294d3ee78a8432.jpg)

Created a pull request for you too  
[https://github.com/critcola/discourse-overwatch-hero-icons/pull/1](https://github.com/critcola/discourse-overwatch-hero-icons/pull/1)

---

_[View the full topic](https://meta.discourse.org/t/typeerror-discourse-dialect-postprocesstext-is-not-a-function/49963)._
