Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export abstract class AbstractStrategy implements IScannerStrategy {
new Command(BrowserToolKeysCommands.Ttl, [key], { replyEncoding: 'utf8' }),
) as number;
} catch (e) {
// ignore error
ttl = null;
}

try {
Expand All @@ -79,15 +79,15 @@ export abstract class AbstractStrategy implements IScannerStrategy {
),
) as number;
} catch (e) {
// ignore error
size = null;
}

try {
type = filterType || await client.sendCommand(
new Command(BrowserToolKeysCommands.Type, [key], { replyEncoding: 'utf8' }),
) as string;
} catch (e) {
// ignore error
type = null;
}

return {
Expand Down Expand Up @@ -128,7 +128,7 @@ export abstract class AbstractStrategy implements IScannerStrategy {
if (transactionError) {
throw transactionError;
} else {
return transactionResults.map((item: [ReplyError, any]) => item[1]);
return transactionResults.map((item: [ReplyError, any]) => item[0] ? null : item[1]);
}
}

Expand All @@ -146,7 +146,7 @@ export abstract class AbstractStrategy implements IScannerStrategy {
if (transactionError) {
throw transactionError;
} else {
return transactionResults.map((item: [ReplyError, any]) => item[1]);
return transactionResults.map((item: [ReplyError, any]) => item[0] ? null : item[1]);
}
}

Expand All @@ -171,7 +171,7 @@ export abstract class AbstractStrategy implements IScannerStrategy {
if (transactionError) {
throw transactionError;
} else {
return transactionResults.map((item: [ReplyError, any]) => item[1]);
return transactionResults.map((item: [ReplyError, any]) => item[0] ? null : item[1]);
}
}
}