Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/api/globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ within each turn of the Node.js event loop.
// before any other promise jobs.

DataHandler.prototype.load = async function load(key) {
const hit = this._cache.get(url);
const hit = this._cache.get(key);
if (hit !== undefined) {
queueMicrotask(() => {
this.emit('load', hit);
Expand All @@ -344,7 +344,7 @@ DataHandler.prototype.load = async function load(key) {
}

const data = await fetchData(key);
this._cache.set(url, data);
this._cache.set(key, data);
this.emit('load', data);
};
```
Expand Down