Skip to content

Commit

Permalink
chore: add a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Aug 13, 2023
1 parent b3de9eb commit 9fe30a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/webview-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,17 @@ async function webviewsFromProcs(adb, deviceSocket = null) {
if (!socketNameMatch) {
continue;
}
const matchedSocketName = socketNameMatch[2];
const crosswalkMatch = CROSSWALK_SOCKET_PATTERN.exec(socketName);
if (!socketNameMatch[2] && !crosswalkMatch) {
if (!matchedSocketName && !crosswalkMatch) {
continue;
}

if ((deviceSocket && socketName === `@${deviceSocket}`) || !deviceSocket) {
webviews.push({
proc: socketName,
webview: socketNameMatch[2]
? `${WEBVIEW_BASE}${socketNameMatch[2]}`
webview: matchedSocketName
? `${WEBVIEW_BASE}${matchedSocketName}`
: `${WEBVIEW_BASE}${crosswalkMatch[1]}`,
});
}
Expand Down

0 comments on commit 9fe30a0

Please sign in to comment.