# Error on invitations page - "Cannot read properties of undefined (reading 'slice')"

**URL:** <https://meta.discourse.org/t/error-on-invitations-page-cannot-read-properties-of-undefined-reading-slice/386879>\
**Category:** Bug\
**Tags:** fixed\
**Created:** [October 27, 2025, 10:03pm UTC](https://meta.discourse.org/t/error-on-invitations-page-cannot-read-properties-of-undefined-reading-slice/386879 "2025-10-27T22:03:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [October 28, 2025, 4:44am UTC](https://meta.discourse.org/t/error-on-invitations-page-cannot-read-properties-of-undefined-reading-slice/386879/3 "2025-10-28T04:44:40Z")

</div>

Invite key is not nullable though:

> <https://github.com/discourse/discourse/blob/dea00180a98025854a72a52f70e93bcfeb1f8836/app/models/invite.rb#L378-L378>

And this is iterating through model.invites:

> <https://github.com/discourse/discourse/blob/dea00180a98025854a72a52f70e93bcfeb1f8836/frontend/discourse/app/templates/user-invited/show.gjs#L216-L232>

I had a look at the code and I am not sure where partially populated code can come from, even when I added a 400ms delay on the network here I can not repro.

I think we need some sort of repro here prior to patching, that patch ends up letting people copy a broken invite link.

---

_[View the full topic](https://meta.discourse.org/t/error-on-invitations-page-cannot-read-properties-of-undefined-reading-slice/386879)._
