# Enable Dev Tools Button

**URL:** <https://meta.discourse.org/t/enable-dev-tools-button/350803>\
**Category:** Theme component\
**Created:** [February 6, 2025, 5:15am UTC](https://meta.discourse.org/t/enable-dev-tools-button/350803 "2025-02-06T05:15:40Z")\
**Posts on this page:** 1\
**Showing post:** 13

<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:** [January 2, 2026, 3:26pm UTC](https://meta.discourse.org/t/enable-dev-tools-button/350803/13 "2026-01-02T15:26:31Z")

</div>

I see this tc throws errors when one is not logged in because of a wrong order of expressions

`if (settings.admin_only && currentUser.admin && currentUser !== null) {`

evaluates `currentUser.admin` even if `currentUser` is null. It should be

`if (settings.admin_only && currentUser && currentUser.admin) {`

---

_[View the full topic](https://meta.discourse.org/t/enable-dev-tools-button/350803)._
