Skip to content

Commit

Permalink
Check, if start of the extension matches
Browse files Browse the repository at this point in the history
  • Loading branch information
sergejostir authored and crynobone committed Dec 28, 2019
1 parent 5324cf5 commit 14ca0b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Asset.php
Expand Up @@ -117,7 +117,7 @@ public function add(
$attributes = [],
$replaces = []
) {
$type = (\pathinfo($source, PATHINFO_EXTENSION) == 'css') ? 'style' : 'script';
$type = (\strpos(\pathinfo($source, PATHINFO_EXTENSION), 'css') === 0) ? 'style' : 'script';

return $this->$type($name, $source, $dependencies, $attributes, $replaces);
}
Expand Down

0 comments on commit 14ca0b4

Please sign in to comment.