style: RegExec match->exec
This commit is contained in:
1 parent
db63018a82
commit
d222835d82
5 files changed
+10
-7
No files matched your search
@@ -166,7 +166,7 @@ export class NTQQWebApi {
|
||||
let resJson;
|
||||
try {
|
||||
const res = await RequestUtil.HttpGetText(url, 'GET', '', { 'Cookie': this.cookieToString(cookieObject) });
|
||||
const match = res.match(/window\.__INITIAL_STATE__=(.*?);/);
|
||||
let match = /window\.__INITIAL_STATE__=(.*?);/.exec(res);
|
||||
if (match) {
|
||||
resJson = JSON.parse(match[1].trim());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user