style: RegExec match->exec

This commit is contained in:
手瓜一十雪 committed 2024-08-26 00:45:12 +08:00
1 parent 5486ffcdcc
commit 5f1d8fb99d
5 files changed
+10 -7

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ export class NTEventChannel extends EventEmitter {
Listener = new ListenerType(this.createProxyDispatch(listenerMainName));
if (!Listener) throw new Error('Init Listener failed');
//实例化NTQQ Listener外包装
const ServiceSubName = listenerMainName.match(/^NodeIKernel(.*?)Listener$/)![1];
const ServiceSubName = /^NodeIKernel(.*?)Listener$/.exec(listenerMainName)![1];
const Service = 'NodeIKernel' + ServiceSubName + 'Service/addKernel' + ServiceSubName + 'Listener';
const addfunc = this.createEventFunction<(listener: T) => number>(Service);
//添加Listener到NTQQ