Skip to content

Commit

Permalink
Add missing content type
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiaslins committed Sep 8, 2023
1 parent e00e890 commit 119e473
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vercel/speed-insights",
"version": "0.0.1",
"version": "0.0.2",
"description": "Speed Insights is a tool for measuring web performance and providing suggestions for improvement.",
"keywords": [
"speed-insights",
Expand Down
4 changes: 3 additions & 1 deletion packages/web/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const ENDPOINT = 'https://vitals.vercel-insights.com/v2/vitals';
export function sendBeacon(
data: Record<string, string | number> | URLSearchParams | undefined,
): void {
const blob = new Blob([JSON.stringify(data)]);
const blob = new Blob([JSON.stringify(data)], {
type: 'text/plain',
});
try {
if ('keepalive' in Request.prototype) {
void fetch(ENDPOINT, {
Expand Down

0 comments on commit 119e473

Please sign in to comment.