Closed
Bug 1241073
Opened 9 years ago
Closed 9 years ago
Print a meaningful error when using Cache::addAll with an array that contains the same file twice
Categories
(Core :: DOM: Service Workers, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1241045
Tracking | Status | |
---|---|---|
firefox46 | --- | affected |
People
(Reporter: marco, Unassigned)
Details
> caches.open('cache')
> .then(cache => cache.addAll(['index.html', 'index.html']))
> .catch(e => console.log(e));
If you run this snippet of code, the following message is printed to the console:
> InvalidStateError: "An attempt was made to use an object that is not, or is no longer, usable"
Since this is a mistake that is easy to make and very difficult to catch, I think we should improve the error and maybe print a warning message even if the developer doesn't explicitly logs the error.
Reporter | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•