ignore memberSince for non-members

This commit is contained in:
Faeze Moradi 2020-10-21 15:06:22 +02:00
parent 873e799ff8
commit eff60e7b67

View File

@ -34,7 +34,7 @@ class MyMembership extends Widget
return $this->render('myMembership', [
'role' => $this->space->getUserGroup(),
'memberSince' => empty($membership) ? '-' : empty($membership->created_at) ? '' : TimeAgo::widget(['timestamp' => $membership->created_at])
'memberSince' => empty($membership) || empty($membership->created_at) ? null : TimeAgo::widget(['timestamp' => $membership->created_at])
]);
}
}