diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2018-08-25 22:42:26 +0900 |
|---|---|---|
| committer | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2018-08-25 22:42:26 +0900 |
| commit | 08a59591ae25280cf11e49d0f5eab4d5a438e147 (patch) | |
| tree | 58086582b6319664ed9571f45593d637e3f1a672 /src/misc | |
| parent | Merge branch 'develop' of https://github.com/syuilo/misskey into develop (diff) | |
| download | sharkey-08a59591ae25280cf11e49d0f5eab4d5a438e147.tar.gz sharkey-08a59591ae25280cf11e49d0f5eab4d5a438e147.tar.bz2 sharkey-08a59591ae25280cf11e49d0f5eab4d5a438e147.zip | |
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; |