Skip to content

Commit

Permalink
Update graphqlParser to to prepend https: to protocol agnostic asset …
Browse files Browse the repository at this point in the history
…urls
  • Loading branch information
ryanhefner committed Oct 8, 2020
1 parent 587dc10 commit d6c42df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/parsers/graphqlParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ export function graphqlParser(rootKey, data, definitionMap, props = { include: 1
clone.height = clone?.file?.details?.image?.height || clone?.file?.details?.video?.height
clone.fileName = clone?.file?.fileName

if (!clone.url.startsWith('https:')) {
clone.url = `https:${clone.url}`
}

delete clone.file

return clone
Expand Down

0 comments on commit d6c42df

Please sign in to comment.