H5: Ugly hack to work around missing H5 emblems

 - this will more than likely occur more often as we take
 - emblem downloader offline
parent 715e29ab
Pipeline #996 passed with stages
in 2 minutes and 12 seconds
......@@ -108,7 +108,13 @@ class Account extends Model
*/
public function h5_emblem()
{
return $this->h5()->select('id', 'account_id');
$h5 = $this->h5();
if (! empty($h5)) {
return $h5->select('id', 'account_id');
}
return null;
}
/**
......
<?php
/** @var $event \Onyx\Halo5\Objects\MatchEvent */
?>
@if (isset($event->killer) && $event->killer != null)
@if (isset($event->killer) && $event->killer != null && $event->killer->h5_emblem != null)
<img class="ui avatar image mobile-hidden" src="{{ $event->killer->h5_emblem->getEmblem() }}">
@endif
<div class="content">
......
<?php
/** @var $event \Onyx\Halo5\Objects\MatchEvent */
?>
@if (isset($event->killer) && $event->killer != null)
@if (isset($event->killer) && $event->killer != null && $event->killer->h5_emblem != null)
<img class="ui avatar image mobile-hidden" src="{{ $event->killer->h5_emblem->getEmblem() }}">
@endif
<div class="content">
......
<?php
/** @var $event \Onyx\Halo5\Objects\MatchEvent */
?>
@if (isset($event->killer) && $event->killer != null)
@if (isset($event->killer) && $event->killer != null && $event->killer->h5_emblem != null)
<img class="ui avatar image mobile-hidden" src="{{ $event->killer->h5_emblem->getEmblem() }}">
@endif
<div class="content">
......
<?php
/** @var $event \Onyx\Halo5\Objects\MatchEvent */
?>
@if (isset($event->killer) && $event->killer != null)
@if (isset($event->killer) && $event->killer != null && $event->killer->h5_emblem != null)
<img class="ui avatar image mobile-hidden" src="{{ $event->killer->h5_emblem->getEmblem() }}">
@endif
<div class="content">
......
<?php
/** @var $event \Onyx\Halo5\Objects\MatchEvent */
?>
@if (isset($event->killer) && $event->killer != null)
@if (isset($event->killer) && $event->killer != null && $event->killer->h5_emblem != null)
<img class="ui avatar image mobile-hidden" src="{{ $event->killer->h5_emblem->getEmblem() }}">
@endif
<div class="content">
......
<?php
/** @var $event \Onyx\Halo5\Objects\MatchEvent */
?>
@if (isset($event->killer) && $event->killer != null)
@if (isset($event->killer) && $event->killer != null && $event->killer->h5_emblem != null)
<img class="ui avatar image mobile-hidden" src="{{ $event->killer->h5_emblem->getEmblem() }}">
@endif
<div class="content">
......
<?php
/** @var $event \Onyx\Halo5\Objects\MatchEvent */
?>
@if (isset($event->killer) && $event->killer != null)
@if (isset($event->killer) && $event->killer != null && $event->killer->h5_emblem != null)
<img class="ui avatar image mobile-hidden" src="{{ $event->killer->h5_emblem->getEmblem() }}">
@endif
<div class="content">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment