diff options
| author | stonedDiscord <Tukz@gmx.de> | 2023-11-30 02:35:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-30 02:35:02 +0100 |
| commit | 4435a4014c0a68fc156a29f83e01cbfab4912794 (patch) | |
| tree | 3c4f6927ae2c515dca1585430aca6cd7f1bf8874 /webAO/utils/fileExists.js | |
| parent | 92aa1322f8b086484a74f40619cf60b4b702720c (diff) | |
| parent | 90ed4b74cac7e8e410175cc3445d7140671e221f (diff) | |
Merge pull request #205 from Troid-Tech/fix-missing-desks
Fix missing desks
Diffstat (limited to 'webAO/utils/fileExists.js')
| -rw-r--r-- | webAO/utils/fileExists.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/webAO/utils/fileExists.js b/webAO/utils/fileExists.js deleted file mode 100644 index 5b60976..0000000 --- a/webAO/utils/fileExists.js +++ /dev/null @@ -1,18 +0,0 @@ -const fileExists = async (url) => new Promise((resolve) => { - const xhr = new XMLHttpRequest(); - xhr.open('HEAD', url); - xhr.onload = function checkLoad() { - if (xhr.readyState === 4) { - if (xhr.status === 200) { - resolve(true); - } else { - resolve(false); - } - } - }; - xhr.onerror = function checkError() { - resolve(false); - }; - xhr.send(null); -}); -export default fileExists; |
