diff options
| author | stonedDiscord <Tukz@gmx.de> | 2023-09-20 12:14:22 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2023-09-20 12:14:22 +0200 |
| commit | abf87b75f8a57e6de0ef7349f6577a0e1c39ce1b (patch) | |
| tree | 1584032f50d7728cbd9e69889b3b36f0ba5ba7f6 /webAO/utils/fileExists.js | |
| parent | 5fc20f9dd53fe4d32be08d538782baa47c67853c (diff) | |
no more eslint errors
Diffstat (limited to 'webAO/utils/fileExists.js')
| -rw-r--r-- | webAO/utils/fileExists.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webAO/utils/fileExists.js b/webAO/utils/fileExists.js index 7978cbc..a4b3b80 100644 --- a/webAO/utils/fileExists.js +++ b/webAO/utils/fileExists.js @@ -1,7 +1,7 @@ -const fileExists = async (url) => new Promise((resolve, reject) => { +const fileExists = async (url) => new Promise((resolve) => { const xhr = new XMLHttpRequest(); xhr.open('HEAD', url); - xhr.onload = function (e) { + xhr.onload = function checkLoad() { if (xhr.readyState === 4) { if (xhr.status === 200) { resolve(true); @@ -10,7 +10,7 @@ const fileExists = async (url) => new Promise((resolve, reject) => { } } }; - xhr.onerror = function (e) { + xhr.onerror = function checkError() { resolve(false); }; xhr.send(null); |
