fix: harden GoPay and 5sim PR paths
This commit is contained in:
@@ -910,13 +910,16 @@
|
||||
const target = Number.isInteger(frameId)
|
||||
? await sendGoPayFrameCommand(tabId, frameId, targetMessageType, {})
|
||||
: await sendGoPayCommand(tabId, targetMessageType, {});
|
||||
const rect = target?.rect || null;
|
||||
if (!target?.found || !rect || !Number.isFinite(rect.centerX) || !Number.isFinite(rect.centerY)) {
|
||||
return { clicked: false, reason: 'target_not_found', clickTarget: target?.target || '' };
|
||||
}
|
||||
await clickWithDebugger(tabId, rect);
|
||||
return { clicked: true, clickTarget: target.target || '' };
|
||||
}
|
||||
const rect = target?.rect || null;
|
||||
if (!target?.found || !rect || !Number.isFinite(rect.centerX) || !Number.isFinite(rect.centerY)) {
|
||||
return { clicked: false, reason: 'target_not_found', clickTarget: target?.target || '' };
|
||||
}
|
||||
if (Number.isInteger(frameId)) {
|
||||
return { clicked: false, reason: 'debugger_click_skipped_for_frame_target', clickTarget: target.target || '' };
|
||||
}
|
||||
await clickWithDebugger(tabId, rect);
|
||||
return { clicked: true, clickTarget: target.target || '' };
|
||||
}
|
||||
|
||||
|
||||
async function clickGoPayContinueWithDebugger(tabId, frameId = null) {
|
||||
|
||||
Reference in New Issue
Block a user