Skip to content

Commit 1a542fe

Browse files
Fixed bug where a mix location without a prepended '/' would not work.
1 parent a2084fa commit 1a542fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Publiux/laravelcdn/CdnFacade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@ public function mix($path)
148148
if (is_null($manifest)) {
149149
$manifest = json_decode(file_get_contents(public_path('mix-manifest.json')), true);
150150
}
151-
if (isset($manifest[$path])) {
152-
return $this->generateUrl($manifest[$path], 'public/');
153-
}
154151
if (isset($manifest['/' . $path])) {
155152
return $this->generateUrl($manifest['/' . $path], 'public/');
156153
}
154+
if (isset($manifest[$path])) {
155+
return $this->generateUrl($manifest[$path], 'public/');
156+
}
157157
throw new \InvalidArgumentException("File {$path} not defined in asset manifest.");
158158
}
159159

0 commit comments

Comments
 (0)