Skip to content

Commit

Permalink
Replace atob with Buffer.from
Browse files Browse the repository at this point in the history
atob is not available on Node
  • Loading branch information
laymonage committed Jul 4, 2021
1 parent e5810e1 commit de316dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/github/getFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function getFile(repoWithOwner: string, path: string, token?: strin
);
}

return atob(data.content);
return Buffer.from(data.content, 'base64').toString();
}

export async function getJSONFile<T>(
Expand Down

1 comment on commit de316dc

@vercel
Copy link

@vercel vercel bot commented on de316dc Jul 4, 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.