Skip to content

Commit

Permalink
Fix double slashes in path
Browse files Browse the repository at this point in the history
  • Loading branch information
gchtr committed Feb 22, 2018
1 parent 8df7022 commit f37cc14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mix.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ function mix( $path, $manifest_directory = 'build' ) {
}

// Get file URL from manifest file
$file_url = get_theme_file_uri( trailingslashit( $manifest_directory ) . $manifest[ $path ] );
$path = $manifest[ $path ];
// Make sure there’s no leading slash
$path = ltrim( $path, '/' );

return $file_url;
return get_theme_file_uri( trailingslashit( $manifest_directory ) . $path );
}

0 comments on commit f37cc14

Please sign in to comment.