aboutsummaryrefslogtreecommitdiff
path: root/src/shared/settings/Search.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-12-22 10:01:24 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-12-22 10:48:39 +0900
commit2e7006ce24c42ec2b6642346d153429338e7334e (patch)
treef1eb9e843ab4ec5d7d3f08fff8c858174b6f1284 /src/shared/settings/Search.ts
parent0881f92d20cb7b4f5a75671df739c3eaa3cd0ff0 (diff)
npm run lint:fix
Diffstat (limited to 'src/shared/settings/Search.ts')
-rw-r--r--src/shared/settings/Search.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/settings/Search.ts b/src/shared/settings/Search.ts
index 7d7e555..7de03de 100644
--- a/src/shared/settings/Search.ts
+++ b/src/shared/settings/Search.ts
@@ -13,11 +13,11 @@ export default class Search {
}
static fromJSON(json: SearchJSON): Search {
- for (let [name, url] of Object.entries(json.engines)) {
+ for (const [name, url] of Object.entries(json.engines)) {
if (!(/^[a-zA-Z0-9]+$/).test(name)) {
throw new TypeError('Search engine\'s name must be [a-zA-Z0-9]+');
}
- let matches = url.match(/{}/g);
+ const matches = url.match(/{}/g);
if (matches === null) {
throw new TypeError(`No {}-placeholders in URL of "${name}"`);
} else if (matches.length > 1) {