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 /webpack | |
| 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 'webpack')
| -rw-r--r-- | webpack/i18n.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/webpack/i18n.ts b/webpack/i18n.ts index f73af72584..4fd439d1d5 100644 --- a/webpack/i18n.ts +++ b/webpack/i18n.ts @@ -8,7 +8,7 @@ export const replacement = (ctx: any, _: any, key: string) => { const client = '/src/client/app/'; let name = null; - if (key[0] == '@') { + if (key.startsWith('@')) { name = ctx.src.substr(ctx.src.indexOf(client) + client.length); key = key.substr(1); } |