Skip to content

Commit

Permalink
fix(worker): replace Math.random() with crypto.randomUUID() (#1762)
Browse files Browse the repository at this point in the history
  • Loading branch information
laryro authored Oct 10, 2023
1 parent eca6a9e commit 078e541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mockServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ self.addEventListener('fetch', function (event) {
}

// Generate unique request ID.
const requestId = Math.random().toString(16).slice(2)
const requestId = crypto.randomUUID()
event.respondWith(handleRequest(event, requestId))
})

Expand Down

0 comments on commit 078e541

Please sign in to comment.