Skip to content

Commit 31a86f5

Browse files
committed
Remove unused err identifiers for ws
1 parent e4aa523 commit 31a86f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

JavaScript/2-WS/server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ const cacheFile = (name) => {
1515
try {
1616
const libPath = require.resolve(filePath);
1717
delete require.cache[libPath];
18-
} catch (e) {
18+
} catch {
1919
return;
2020
}
2121
try {
2222
const method = require(filePath);
2323
api.set(key, method);
24-
} catch (e) {
24+
} catch {
2525
api.delete(key);
2626
}
2727
};
@@ -53,7 +53,7 @@ const server = http.createServer(async (req, res) => {
5353
try {
5454
const data = await fs.promises.readFile(path);
5555
res.end(data);
56-
} catch (err) {
56+
} catch {
5757
res.statusCode = 404;
5858
res.end('"File is not found"');
5959
}

0 commit comments

Comments
 (0)