diff options
| author | stonedDiscord <stonedDiscord@users.noreply.github.com> | 2024-11-20 13:31:50 +0000 |
|---|---|---|
| committer | GitHub Action <actions@github.com> | 2024-11-20 13:31:50 +0000 |
| commit | 6684f3fce6e90fd0574d7bab63b629554ab03ef6 (patch) | |
| tree | b2a62247d17e23a77af57aea355ba621666817c2 /webAO/utils/findImgSrc.ts | |
| parent | 95a2d1361d84c61b454ebe506e6963b93f6d8dee (diff) | |
Prettified Code!
Diffstat (limited to 'webAO/utils/findImgSrc.ts')
| -rw-r--r-- | webAO/utils/findImgSrc.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/webAO/utils/findImgSrc.ts b/webAO/utils/findImgSrc.ts index b4db849..d33215a 100644 --- a/webAO/utils/findImgSrc.ts +++ b/webAO/utils/findImgSrc.ts @@ -1,5 +1,5 @@ import filesExist from "./filesExist"; -import transparentPng from '../constants/transparentPng' +import transparentPng from "../constants/transparentPng"; /** * This function takes a list of urls and returns the first one that exists. @@ -9,11 +9,11 @@ import transparentPng from '../constants/transparentPng' * @returns The image source of the first url that exists, or a transparent png if none exist */ export default async function findImgSrc(urls: string[]): Promise<string> { - return filesExist(urls).then((url) => { - if (url !== null) { - return url; - } - // If none of the images exist, return a transparent png - return transparentPng; - }); + return filesExist(urls).then((url) => { + if (url !== null) { + return url; + } + // If none of the images exist, return a transparent png + return transparentPng; + }); } |
