commit
ffd8ba381d
1 changed files with 2 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ export function addModel(
|
|||
(prev, curr) => (curr.title.startsWith(model.title) ? prev + 1 : prev),
|
||||
0,
|
||||
);
|
||||
if (numMatches !== 0) {
|
||||
if (numMatches !== undefined && numMatches > 0) {
|
||||
model.title = `${model.title} (${numMatches})`;
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ export function addModel(
|
|||
"name" in curr && curr.name.startsWith(model.title) ? prev + 1 : prev,
|
||||
0,
|
||||
);
|
||||
if (numMatches !== 0) {
|
||||
if (numMatches !== undefined && numMatches > 0) {
|
||||
model.title = `${model.title} (${numMatches})`;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue