summaryrefslogtreecommitdiff
path: root/src/api/rules.ts
diff options
context:
space:
mode:
authorMatain <[email protected]>2022-06-12 23:38:31 +0800
committerMatain <[email protected]>2022-06-12 23:38:31 +0800
commite4e921e0b93f74bf126ca80cbb83f5e912f73a88 (patch)
treeca586f4753f5266ab67051235c7a79370fca1333 /src/api/rules.ts
parenta825925cc97d95762634d234ef06be1627a21fb1 (diff)
parentea5d7cf003eeef30cb7bbe789c6ba7f314bf1ce4 (diff)
Merge branch 'haishanh-master'
Diffstat (limited to 'src/api/rules.ts')
-rw-r--r--src/api/rules.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/api/rules.ts b/src/api/rules.ts
index b57b0e3..4d18c23 100644
--- a/src/api/rules.ts
+++ b/src/api/rules.ts
@@ -12,9 +12,7 @@ type RuleAPIItem = {
proxy: string;
};
-function normalizeAPIResponse(json: {
- rules: Array<RuleAPIItem>;
-}): Array<RuleItem> {
+function normalizeAPIResponse(json: { rules: Array<RuleAPIItem> }): Array<RuleItem> {
invariant(
json.rules && json.rules.length >= 0,
'there is no valid rules list in the rules API response'