mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
fix: correct split logic in parseSubinfo (#960)
This commit is contained in:
parent
a23e23a697
commit
e20e46aebe
@ -226,7 +226,7 @@ function parseFilename(str: string): string {
|
|||||||
|
|
||||||
// subscription-userinfo: upload=1234; download=2234; total=1024000; expire=2218532293
|
// subscription-userinfo: upload=1234; download=2234; total=1024000; expire=2218532293
|
||||||
function parseSubinfo(str: string): ISubscriptionUserInfo {
|
function parseSubinfo(str: string): ISubscriptionUserInfo {
|
||||||
const parts = str.split('; ')
|
const parts = str.split(/\s*;\s*/)
|
||||||
const obj = {} as ISubscriptionUserInfo
|
const obj = {} as ISubscriptionUserInfo
|
||||||
parts.forEach((part) => {
|
parts.forEach((part) => {
|
||||||
const [key, value] = part.split('=')
|
const [key, value] = part.split('=')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user