Fix loading for branding for undefined
This commit is contained in:
@@ -9,7 +9,7 @@ export const useBrandingStore = defineStore(
|
|||||||
() => {
|
() => {
|
||||||
|
|
||||||
const currentBrand = ref('')
|
const currentBrand = ref('')
|
||||||
|
|
||||||
const value = useSessionStorage(
|
const value = useSessionStorage(
|
||||||
'branding',
|
'branding',
|
||||||
{},
|
{},
|
||||||
@@ -24,11 +24,11 @@ export const useBrandingStore = defineStore(
|
|||||||
watch(
|
watch(
|
||||||
() => route.params.creator,
|
() => route.params.creator,
|
||||||
async () => {
|
async () => {
|
||||||
console.log(`creator: ${route.params.creator}`)
|
|
||||||
console.log(`currentBrand: ${currentBrand.value}`)
|
|
||||||
if (route.params.creator !== currentBrand.value) {
|
if (route.params.creator !== currentBrand.value) {
|
||||||
await fetchCreatorData(route.params.creator);
|
if (route.params.creator !== undefined) {
|
||||||
currentBrand.value = route.params.creator
|
await fetchCreatorData(route.params.creator)
|
||||||
|
currentBrand.value = route.params.creator
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user