Return no image if given value is not numeric

This commit is contained in:
Philipp Lang 2020-10-29 21:33:43 +00:00
parent b7774236f6
commit 82b358f69d
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class Responsiveimage extends FormWidgetBase
: 'null';
$this->vars['minWidth'] = $this->minWidth ?: '0';
$this->vars['name'] = $this->formField->getName();
$this->vars['value'] = $this->getLoadValue() ?: 'null';
$this->vars['value'] = is_numeric($this->getLoadValue()) ? $this->getLoadValue() : 'null';
$this->vars['meta'] = $this->getLoadValue()
? $this->vueParam(app(UploadStorage::class)->getFileData($this->getLoadValue()))
: 'null';