Skip to content

Commit

Permalink
Merge pull request #22 from navikt/safer-url-extract
Browse files Browse the repository at this point in the history
fix: 🐛 Tryggere håndtering av manifest URLer
  • Loading branch information
nutgaard authored Jan 18, 2021
2 parents 3525543 + 5bd9b7f commit d8d83f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function extractPathsFromCRAManifest(manifestObject: ManifestObject): string[] {
const fileList = Object.entries(files).map(([name, path]) => ({name, path})) as {name: string, path: string}[];

entrypoints.forEach((entrypoint) => {
const matchingFile = fileList.find(file => file.path.includes(entrypoint));
const matchingFile = fileList.find(file => file.path.endsWith(entrypoint));

if (matchingFile) {
pathsToLoad.push(matchingFile.path);
Expand Down

0 comments on commit d8d83f6

Please sign in to comment.