(fix)(headless) BaseMapper.getMatches,空Map提前返回matches

This commit is contained in:
wangyong97
2025-07-03 20:30:59 +08:00
parent 66ad18f4d3
commit b80db694c5

View File

@@ -129,7 +129,7 @@ public abstract class BaseMapper implements SchemaMapper {
Map<MatchText, List<T>> matchResult = matchStrategy.match(chatQueryContext, terms,
chatQueryContext.getRequest().getDataSetIds());
List<T> matches = new ArrayList<>();
if (Objects.isNull(matchResult)) {
if (Objects.isNull(matchResult) || matchResult.isEmpty()) {
return matches;
}
Optional<List<T>> first = matchResult.entrySet().stream()