Skip to content

Commit 4f231f4

Browse files
author
Franck Freiburger
committed
fix(docs): compiledCache.get() should only return Promise<string|undefined>
closes #195
1 parent b8c72f4 commit 4f231f4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ Maybe (not tested), the following libraries may help you to gain more space [pak
374374
},
375375
get(key) {
376376

377-
return window.localStorage.getItem(key);
377+
return window.localStorage.getItem(key) ?? undefined;
378378
},
379379
},
380380
...

docs/examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ In the following examples, for convenience, we just returns static content as fi
221221
},
222222
get(key) {
223223
224-
return window.localStorage.getItem(key);
224+
return window.localStorage.getItem(key) ?? undefined;
225225
},
226226
},
227227

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export type Options = {
325325
* },
326326
* get(key) {
327327
*
328-
* return window.localStorage.getItem(key);
328+
* return window.localStorage.getItem(key) ?? undefined;
329329
* },
330330
* },
331331
* ...

0 commit comments

Comments
 (0)