Early return if no asset is found

This commit is contained in:
Ivan Nieto Vivanco 2023-08-30 11:05:58 -06:00
parent c0cbdb1fc4
commit 085a993340

View file

@ -39,6 +39,10 @@ class Label implements View
$assets = $this->data->get('assets'); $assets = $this->data->get('assets');
$offset = $this->data->get('offset'); $offset = $this->data->get('offset');
$template = $this->data->get('template'); $template = $this->data->get('template');
if ($assets->isEmpty()){
return redirect()->back();
}
// If disabled, pass to legacy view // If disabled, pass to legacy view
if ((!$settings->label2_enable) && (!$template)) { if ((!$settings->label2_enable) && (!$template)) {