Skip to content

Commit c190197

Browse files
committed
add ability to define JS array in configuration of HTMLElement
1 parent 7e0ab80 commit c190197

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Mapbender/CoreBundle/Element/HTMLElement.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,11 @@ public function getAssets()
221221
$configuration = $this->getConfiguration();
222222
$assets = $this::listAssets();
223223
if (isset($configuration['jsSrc'])) {
224-
$assets['js'][] = $configuration['jsSrc'];
224+
if (is_array($configuration['jsSrc'])) {
225+
$assets['js'] = array_merge($assets['js'], $configuration['jsSrc']);
226+
} else {
227+
$assets['js'][] = $configuration['jsSrc'];
228+
}
225229
}
226230
return $assets;
227231
}

0 commit comments

Comments
 (0)