mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
js: cleanup error throwing to always use new Error (#504)
This commit is contained in:
@@ -42,7 +42,7 @@ class MockServer {
|
||||
this.numRequests++;
|
||||
const range = request.headers.get("range")?.substr(6).split("-");
|
||||
if (!range) {
|
||||
throw Error("invalid range");
|
||||
throw new Error("invalid range");
|
||||
}
|
||||
const offset = +range[0];
|
||||
const length = +range[1];
|
||||
|
||||
Reference in New Issue
Block a user