mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-11-29 07:50:33 +00:00
feat: 订阅流量数据兼容无 upload 字段的情况
This commit is contained in:
2 files changed
+3
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.20.33",
|
||||
"version": "2.20.34",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -186,7 +186,8 @@ export function parseFlowHeaders(flowHeaders) {
|
||||
const uploadMatch = flowHeaders.match(
|
||||
/upload=([-+]?)([0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)/,
|
||||
);
|
||||
const upload = Number(uploadMatch[1] + uploadMatch[2]);
|
||||
const upload =
|
||||
uploadMatch == null ? 0 : Number(uploadMatch[1] + uploadMatch[2]);
|
||||
|
||||
const downloadMatch = flowHeaders.match(
|
||||
/download=([-+]?)([0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)/,
|
||||
|
||||
Reference in new issue
Block a user