summaryrefslogtreecommitdiff
path: root/src/misc
diff options
context:
space:
mode:
authorAya Morisawa <AyaMorisawa4869@gmail.com>2018-08-25 22:42:26 +0900
committerAya Morisawa <AyaMorisawa4869@gmail.com>2018-08-25 22:42:26 +0900
commit08a59591ae25280cf11e49d0f5eab4d5a438e147 (patch)
tree58086582b6319664ed9571f45593d637e3f1a672 /src/misc
parentMerge branch 'develop' of https://github.com/syuilo/misskey into develop (diff)
downloadsharkey-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.ts4
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;