mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-16 04:35:56 +00:00
fix(event): fix ipcman
This commit is contained in:
parent
e1896fa434
commit
fdcc612b3d
@ -135,8 +135,12 @@ export const apply = async (ctx: ChronocatContext) => {
|
||||
const handler = (data: IpcManData) => {
|
||||
switch (data.type) {
|
||||
case 'event': {
|
||||
const d = data.args[1] as RedIpcDataEvent
|
||||
void dispatcher(d.cmdName, d.payload)
|
||||
if (!data.args[1] || !Array.isArray(data.args[1])) return
|
||||
const d = data.args[1] as [RedIpcDataEvent]
|
||||
if (!d.length) return
|
||||
const e = d[0]
|
||||
if (!e || !('cmdName' in e)) return
|
||||
void dispatcher(e.cmdName, e.payload)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user