Skip to content

Commit

Permalink
fix: forgot the quote marks
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaellis committed Feb 3, 2021
1 parent e6d3a5c commit 760b989
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/base64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function fixBinary(bin) {

// polyfill for SSR as atob is not available - https://gist.github.com/jmshal/b14199f7402c8f3a4568733d8bed0f25
const atobPolyfill = (a: string) =>
typeof window === undefined ? Buffer.from(a, 'base64').toString('binary') : atob(a)
typeof window === 'undefined' ? Buffer.from(a, 'base64').toString('binary') : atob(a)

export const createImageUrl = (blob: string, type: string) =>
URL.createObjectURL(new Blob([fixBinary(atobPolyfill(blob))], { type }))

1 comment on commit 760b989

@vercel
Copy link

@vercel vercel bot commented on 760b989 Feb 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.