fix(ssr): null-safe campaign access to prevent TypeError during SSR

This commit is contained in:
F4ilji
2026-07-06 14:11:38 +05:00
parent 3ee875a6db
commit 520533ef1f
2 changed files with 3 additions and 2 deletions
@@ -14,7 +14,7 @@ class GetAdmissionCampaignNameTask
return Cache::remember($cacheKey, now()->addHours(1), function () {
$campaign = AdmissionCampaign::query()->where('status', 1)->first();
return $campaign->name;
return $campaign?->name ?? '';
});
}
}
+2 -1
View File
@@ -45,7 +45,8 @@ export default {
props: {
campaignName: {
type: String,
},
default: '',
},
levelsEducational: {
type: Object,
},