diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-08-26 01:18:34 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-26 01:18:34 +0900 |
| commit | a1fca2550ec7ff76e955c8e81bd1e785b0f61beb (patch) | |
| tree | 58086582b6319664ed9571f45593d637e3f1a672 /src/misc | |
| parent | Merge branch 'develop' of https://github.com/syuilo/misskey into develop (diff) | |
| parent | Use startsWith and endsWith for readability (diff) | |
| download | misskey-a1fca2550ec7ff76e955c8e81bd1e785b0f61beb.tar.gz misskey-a1fca2550ec7ff76e955c8e81bd1e785b0f61beb.tar.bz2 misskey-a1fca2550ec7ff76e955c8e81bd1e785b0f61beb.zip | |
Merge pull request #2488 from syuilo/refactor-string
Use startsWith and endsWith for readability
Diffstat (limited to 'src/misc')
| -rw-r--r-- | src/misc/fa.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc/fa.ts b/src/misc/fa.ts index 077bb51e6d..8be06362c3 100644 --- a/src/misc/fa.ts +++ b/src/misc/fa.ts @@ -25,9 +25,9 @@ export const replacement = (match: string, key: string) => { arg == 'S' ? 'fas' : arg == 'B' ? 'fab' : ''; - } else if (arg[0] == '.') { + } else if (arg.startsWith('.')) { classes.push('fa-' + arg.substr(1)); - } else if (arg[0] == '-') { + } else if (arg.startsWith('-')) { transform = arg.substr(1).split('|').join(' '); } else { name = arg; |