Skip to content

Commit 309e2d6

Browse files
Service Worker docs: Update cache.put arguments in example (#7868)
* Service Worker: Update cache.put arguments Cache.put takes in multiple arguments but is only supplied one in the example. * Update documentation/docs/30-advanced/40-service-workers.md Co-authored-by: Rich Harris <[email protected]>
1 parent 96213bc commit 309e2d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

documentation/docs/30-advanced/40-service-workers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ self.addEventListener('fetch', (event) => {
7272
const response = await fetch(event.request);
7373

7474
if (response.status === 200) {
75-
cache.put(response.clone());
75+
cache.put(event.request, response.clone());
7676
}
7777

7878
return response;

0 commit comments

Comments
 (0)