fix: cannot read properties of undefined

This commit is contained in:
pa
2025-10-29 21:12:17 +09:00
committed by Natsumi
parent ac99f7f257
commit 3c640b99c1
2 changed files with 8 additions and 5 deletions
@@ -147,7 +147,7 @@
v-if="randomUserColours" v-if="randomUserColours"
:style="{ color: scope.row.user.$userColour }" :style="{ color: scope.row.user.$userColour }"
v-text="scope.row.user.displayName"></span> v-text="scope.row.user.displayName"></span>
<span v-else v-text="scope.row.user.displayName"></span> <span v-else v-text="scope.row.user?.displayName"></span>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@@ -264,7 +264,7 @@
v-if="randomUserColours" v-if="randomUserColours"
:style="{ color: scope.row.user.$userColour }" :style="{ color: scope.row.user.$userColour }"
v-text="scope.row.user.displayName"></span> v-text="scope.row.user.displayName"></span>
<span v-else v-text="scope.row.user.displayName"></span> <span v-else v-text="scope.row.user?.displayName"></span>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@@ -380,7 +380,7 @@
v-if="randomUserColours" v-if="randomUserColours"
:style="{ color: scope.row.user.$userColour }" :style="{ color: scope.row.user.$userColour }"
v-text="scope.row.user.displayName"></span> v-text="scope.row.user.displayName"></span>
<span v-else v-text="scope.row.user.displayName"></span> <span v-else v-text="scope.row.user?.displayName"></span>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@@ -465,7 +465,7 @@
v-if="randomUserColours" v-if="randomUserColours"
:style="{ color: scope.row.user.$userColour }" :style="{ color: scope.row.user.$userColour }"
v-text="scope.row.user.displayName"></span> v-text="scope.row.user.displayName"></span>
<span v-else v-text="scope.row.user.displayName"></span> <span v-else v-text="scope.row.user?.displayName"></span>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@@ -576,7 +576,7 @@
v-if="randomUserColours" v-if="randomUserColours"
:style="{ color: scope.row.user.$userColour }" :style="{ color: scope.row.user.$userColour }"
v-text="scope.row.user.displayName"></span> v-text="scope.row.user.displayName"></span>
<span v-else v-text="scope.row.user.displayName"></span> <span v-else v-text="scope.row.user?.displayName"></span>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
+3
View File
@@ -227,6 +227,9 @@ function userImage(
* @returns {string|*} * @returns {string|*}
*/ */
function userImageFull(user) { function userImageFull(user) {
if (!user) {
return '';
}
const appAppearanceSettingsStore = useAppearanceSettingsStore(); const appAppearanceSettingsStore = useAppearanceSettingsStore();
if ( if (
appAppearanceSettingsStore.displayVRCPlusIconsAsAvatar && appAppearanceSettingsStore.displayVRCPlusIconsAsAvatar &&