We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae8981e commit a1f6487Copy full SHA for a1f6487
app/components/User/Avatar.vue
@@ -31,12 +31,15 @@ const textClass = computed(() => {
31
}
32
})
33
34
-const { data: gravatarUrl } = useLazyFetch(() => `/api/gravatar/${props.username}`, {
35
- transform: res => (res.hash ? `/_avatar/${res.hash}?s=128&d=404` : null),
36
- getCachedData(key, nuxtApp) {
37
- return nuxtApp.static.data[key] ?? nuxtApp.payload.data[key]
+const { data: gravatarUrl } = useLazyFetch(
+ () => `/api/gravatar/${encodeURIComponent(props.username)}`,
+ {
+ transform: res => (res.hash ? `/_avatar/${res.hash}?s=128&d=404` : null),
38
+ getCachedData(key, nuxtApp) {
39
+ return nuxtApp.static.data[key] ?? nuxtApp.payload.data[key]
40
+ },
41
},
-})
42
+)
43
</script>
44
45
<template>
0 commit comments