DevCompanion: opinionated hacky changes

This commit is contained in:
Sqaaakoi 2024-08-28 07:24:56 +12:00 committed by sadan4
parent 5851355248
commit b6baaf81b1
2 changed files with 3 additions and 1 deletions

View file

@ -212,6 +212,7 @@ export function initWs(isManual = false) {
let results: any[];
switch (findType.replace("find", "").replace("Lazy", "")) {
case "":
case "Component":
results = findAll(parsedArgs[0]);
break;
case "ByProps":
@ -317,6 +318,7 @@ export function initWs(isManual = false) {
let results: any[];
switch (type.replace("find", "").replace("Lazy", "")) {
case "":
case "Component":
results = findAll(parsedArgs[0]);
break;
case "ByProps":

View file

@ -95,7 +95,7 @@ export function findModuleId(find: CodeFilter) {
throw new Error("No Matches Found");
}
if (matches.length !== 1) {
throw new Error("More than one match");
throw new Error(`This filter matches ${matches.length} modules. Make it more specific!`);
}
return matches[0];
}