Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Fix src() method in RequireJSHelper.php #72

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Templating/Helper/RequireJSHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,13 @@ public function initialize(array $options = array())
*/
public function src()
{
if ($this->engine->exists($this->requireJsSrc)
&& $this->engine->supports($this->requireJsSrc)) {
return $this->engine->render($this->requireJsSrc);
try {
if ($this->engine->supports($this->requireJsSrc)
&& $this->engine->exists($this->requireJsSrc)) {
return $this->engine->render($this->requireJsSrc);
}
}
catch (\InvalidArgumentException $err) {
}

return $this->requireJsSrc;
Expand Down