# 头像选择器模态框因“t.split 不是函数”崩溃 (avatar-selector.gjs)

**URL:** <https://meta.discourse.org/t/avatar-selector-modal-crashes-with-t-split-is-not-a-function-avatar-selector-gjs/407452>\
**Category:** Bug\
**Created:** [2026年七月13日 14:18 UTC](https://meta.discourse.org/t/avatar-selector-modal-crashes-with-t-split-is-not-a-function-avatar-selector-gjs/407452 "2026-07-13T14:18:12Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![akanora](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akanora/32/575035_2.png) [@akanora](https://meta.discourse.org/u/akanora)\
**Post date:** [2026年七月13日 14:18 UTC](https://meta.discourse.org/t/avatar-selector-modal-crashes-with-t-split-is-not-a-function-avatar-selector-gjs/407452/1 "2026-07-13T14:18:13Z")

</div>

**摘要：**  
打开头像选择器模态框（用于更改个人资料头像）时抛出 JavaScript 错误，且弹出窗口无法正常工作。

**Discourse 版本：** v2026.7.0-latest (commit 59588b5d2a)  
**Ember 版本：** v6.10.1

**复现步骤：**

1. 进入用户个人资料
2. 点击更改头像选项
3. 头像选择器模态框打开（根据堆栈跟踪，由“已解决”移动确认模态框流程触发）
4. 浏览器控制台立即出现错误，且模态框行为异常

**预期行为：**  
头像选择器应正常打开，并允许用户选择/上传头像。

**实际行为：**  
控制台抛出：`TypeError: t.split is not a function`，位于 `avatar-selector.gjs` 中的 `selectableAvatars` getter 内。

**已进行的故障排除：**

- 在禁用所有主题和插件的安全模式下测试，错误仍然存在，因此似乎不是由主题或插件引起的。

**浏览器 / 操作系统：**

Brave / Windows 11

**控制台日志 / 堆栈跟踪：**  
```  
?safe\_mode=no\_themes,no\_plugins:346 GET [https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496](https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496) net::ERR\_BLOCKED\_BY\_CLIENT  
app.js:365 ℹ Discourse v2026.7.0-latest — [Commits · discourse/discourse · GitHub](https://github.com/discourse/discourse/commits/59588b5d2a) — Ember v6.10.1  
avatar-selector.gjs:47 Uncaught (in promise) TypeError: t.split is not a function  
at get selectableAvatars (avatar-selector.gjs:47:47)  
at R (cache-DtDz7X5V.js:1647:15)  
at index.js:87:32  
at index.js:64:37  
at zn (index.js:396:5)  
at j (index.js:62:16)  
at index-DaCZcoCY.js:4335:20  
at index.js:64:37  
at zn (index.js:396:5)  
at j (index.js:62:16)  
at index-DaCZcoCY.js:4335:20  
at index.js:64:37  
at zn (index.js:396:5)  
at j (index.js:62:16)  
at index.js:158:20  
at index.js:64:37  
at zn (index.js:396:5)  
at j (index.js:62:16)  
at Object.evaluate (index.js:1970:16)  
at Object.evaluate (index.js:103:106)  
at zb.evaluateSyscall (index.js:2873:20)  
at zb.evaluateInner (index.js:2852:64)  
at zb.evaluateOuter (index.js:2849:10)  
at e.next (index.js:4167:45)  
at e.\_execute (index.js:4157:21)  
at e.execute (index.js:4133:41)  
at \_x.handleException (index.js:3450:19)  
at bx.handleException (index.js:3592:52)  
at hx.throw (index.js:3414:16)  
at iy.evaluate (index.js:565:37)  
at hx.\_execute (index.js:3401:34)  
at hx.execute (index.js:3393:17)  
at xx.rerender (index.js:3610:8)  
at ww.render (index-DaCZcoCY.js:5211:23)  
at index-DaCZcoCY.js:5409:16  
at xb (index.js:2414:7)  
at e.renderRoots (index-DaCZcoCY.js:5389:7)  
at #o (index-DaCZcoCY.js:5374:12)  
at e.revalidate (index-DaCZcoCY.js:5435:10)  
at invoke (index.js:264:14)  
at Rc.flush (index.js:180:11)  
at zc.flush (index.js:334:19)  
at pl.\_end (index.js:762:32)  
at \_boundAutorunEnd (index.js:499:12)  
selectableAvatars @ avatar-selector.gjs:47  
\_getProp @ cache-DtDz7X5V.js:1647  
(anonymous) @ index.js:87  
(anonymous) @ index.js:64  
track @ index.js:396  
valueForRef @ index.js:62  
(anonymous) @ index-DaCZcoCY.js:4335  
(anonymous) @ index.js:64  
track @ index.js:396  
valueForRef @ index.js:62  
(anonymous) @ index-DaCZcoCY.js:4335  
(anonymous) @ index.js:64  
track @ index.js:396  
valueForRef @ index.js:62  
(anonymous) @ index.js:158  
(anonymous) @ index.js:64  
track @ index.js:396  
valueForRef @ index.js:62  
(anonymous) @ index.js:1970  
evaluate @ index.js:103  
evaluateSyscall @ index.js:2873  
evaluateInner @ index.js:2852  
evaluateOuter @ index.js:2849  
next @ index.js:4167  
\_execute @ index.js:4157  
execute @ index.js:4133  
handleException @ index.js:3450  
handleException @ index.js:3592  
throw @ index.js:3414  
evaluate @ index.js:565  
\_execute @ index.js:3401  
execute @ index.js:3393  
rerender @ index.js:3610  
(anonymous) @ index-DaCZcoCY.js:5211  
(anonymous) @ index-DaCZcoCY.js:5409  
inTransaction @ index.js:2414  
renderRoots @ index-DaCZcoCY.js:5389  
#o @ index-DaCZcoCY.js:5374  
revalidate @ index-DaCZcoCY.js:5435  
invoke @ index.js:264  
flush @ index.js:180  
flush @ index.js:334  
\_end @ index.js:762  
(anonymous) @ index.js:499  
Promise.then  
(anonymous) @ index.js:18  
flush @ index.js:29  
\_scheduleAutorun @ index.js:928  
\_end @ index.js:768  
(anonymous) @ index.js:499  
Promise.then  
(anonymous) @ index.js:18  
flush @ index.js:29  
\_scheduleAutorun @ index.js:928  
\_end @ index.js:768  
(anonymous) @ index.js:499  
Promise.then  
(anonymous) @ index.js:18  
flush @ index.js:29  
\_scheduleAutorun @ index.js:928  
\_ensureInstance @ index.js:919  
ensureInstance @ index.js:731  
scheduleRevalidate @ index-DaCZcoCY.js:4146  
dirtyTag @ index.js:229  
dirtyTagFor @ index.js:848  
setter @ index.js:871  
set @ cache-DtDz7X5V.js:1886  
show @ modal.js:57  
await in show  
showAvatarSelector @ account.js:43  
\_join @ index.js:788  
join @ index.js:605  
join @ index.js:152  
(anonymous) @ route-action.js:48  
(anonymous) @ index.js:2534  
(anonymous) @ d-button.gts:216  
invoke @ index.js:264  
flush @ index.js:180  
flush @ index.js:334  
\_end @ index.js:762  
end @ index.js:565  
\_runExpiredTimers @ index.js:869  
setTimeout  
setTimeout @ index.js:39  
\_installTimerTimeout @ index.js:912  
\_reinstallTimerTimeout @ index.js:896  
\_later @ index.js:829  
later @ index.js:652  
next @ index.js:562  
\_triggerAction @ d-button.gts:213  
click @ d-button.gts:167  
```

---

_[View the full topic](https://meta.discourse.org/t/avatar-selector-modal-crashes-with-t-split-is-not-a-function-avatar-selector-gjs/407452)._
