Skip to content

Commit

Permalink
fix: handle operation
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-cn committed Feb 25, 2024
1 parent af642a4 commit f593603
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/service/V11/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ export class V11 extends Service<"V11"> implements OneBot.Base {
try {
data = JSON.parse(msgStr) as V11.Protocol;
let ret: string;
if (data.action.startsWith(".handle_quick_operation")) {
if (data.action?.startsWith(".handle_quick_operation")) {
const event = data.params.context,
res = data.params.operation;
this._quickOperate(event, res);
Expand Down
2 changes: 1 addition & 1 deletion src/service/V12/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ export class V12 extends Service<"V12"> implements OneBot.Base {
try {
data = JSON.parse(String(msg)) as V12.Protocol;
let ret: string;
if (data.action.startsWith(".handle_quick_operation")) {
if (data.action?.startsWith(".handle_quick_operation")) {
const event = data.params.context,
res = data.params.operation;
this._quickOperate(event, res);
Expand Down

0 comments on commit f593603

Please sign in to comment.