Commit c658ae93 authored by Robert Lyon's avatar Robert Lyon

Bug 1851589: only load block js files if the string is not empty

behatnotneeded

Change-Id: I1a954fa83196fd68758ef08e16433ca7dd5b974c
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 42268822
......@@ -2098,7 +2098,7 @@ class BlockInstance {
$js = '';
foreach ($jsfiles as $jsfile) {
$file = (is_array($jsfile) && isset($jsfile['file'])) ? $jsfile['file'] : $jsfile;
$file = (is_array($jsfile) && !empty($jsfile['file'])) ? $jsfile['file'] : $jsfile;
if (stripos($file, 'http://') === false && stripos($file, 'https://') === false) {
$file = 'blocktype/' . $this->blocktype . '/' . $file;
......
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