Applied feedback

This commit is contained in:
digeff
2020-11-10 12:56:12 -08:00
parent 5e636afbcf
commit 559f9b60d1
3 changed files with 29 additions and 14 deletions

View File

@@ -43,10 +43,16 @@ export class ExtHostSearch implements ExtHostSearchShape {
) {
commands.registerArgumentProcessor({
processArgument: arg => {
if (arg.renderableMatch !== undefined) {
const filteredProperties = { ...arg };
delete filteredProperties.renderableMatch;
return filteredProperties;
if (arg && Array.isArray(arg)) {
return arg.map(matchContext => {
if (matchContext.$mid === 13 /* SearchViewContextMid */) {
const filteredProperties = { ...matchContext };
delete filteredProperties.renderableMatch;
return filteredProperties;
} else {
return matchContext;
}
});
} else {
return arg;
}