!60 【轻量级 PR】兼容老yunzai面板更新

* feat: 兼容老yunzai
This commit is contained in:
dujiu 2023-12-11 19:16:03 +00:00 committed by Kokomi
parent cd1907f377
commit c44b308f87

View File

@ -56,9 +56,15 @@ const ProfileList = {
}
let isSelfUid = false
if (e.runtime) {
let uids = e.runtime?.user?.getCkUidList(e.game) || []
isSelfUid = uids.some(ds => ds.uid === uid + '')
if (e.runtime && e.runtime?.user) {
let uids = []
let user = e.runtime.user
if (typeof user.getCkUidList === 'function') {
uids = user.getCkUidList(e.game).map(i => i.uid) || []
} else {
uids = user.ckUids || []
}
isSelfUid = uids.some(ds => ds === uid + '')
}
let rank = false