Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Jul 13, 2017
2 parents 1e90a7a + c5cf17e commit d73a7b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Jade/Symfony/Css.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ class Css
{
protected $assetsHelper;

public function __construct(AssetsHelper $assetsHelper)
public function __construct(AssetsHelper $assetsHelper = null)
{
$this->assetsHelper = $assetsHelper;
}

public function getUrl($url)
{
return sprintf('url(%s)', var_export($this->assetsHelper->getUrl($url), true));
if ($this->assetsHelper) {
$url = $this->assetsHelper->getUrl($url);
}

return sprintf('url(%s)', var_export($url, true));
}
}

0 comments on commit d73a7b1

Please sign in to comment.