# Problem with DiscoTOC: TypeError: \_offsetCalculator.headerOffset is not a function

**URL:** <https://meta.discourse.org/t/problem-with-discotoc-typeerror-offsetcalculator-headeroffset-is-not-a-function/219710>\
**Category:** Bug\
**Created:** [March 1, 2022, 3:08pm UTC](https://meta.discourse.org/t/problem-with-discotoc-typeerror-offsetcalculator-headeroffset-is-not-a-function/219710 "2022-03-01T15:08:26Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)\
**Post date:** [March 1, 2022, 9:21pm UTC](https://meta.discourse.org/t/problem-with-discotoc-typeerror-offsetcalculator-headeroffset-is-not-a-function/219710/4 "2022-03-01T21:21:32Z")

</div>

I think headerOffset, used by DiscoTOC since the 18 jan refactoring, appears in `app/assets/javascripts/discourse/app/lib/offset-calculator.js` [in this commit](https://github.com/discourse/discourse/commit/1ed2520589d988cc3299f8a85c8a20ade502f45d#diff-ee360fb09f76b3326cb85fe1cf363e30b3cc98e7d783dc97910f85dff0641990) on 7 jan, between 2.8.0.beta10 (21 dec) and 2.8.0.beta11 (13 jan)

---

_[View the full topic](https://meta.discourse.org/t/problem-with-discotoc-typeerror-offsetcalculator-headeroffset-is-not-a-function/219710)._
