when there are fewer indexes return true
This commit is contained in:
parent
7773a65be3
commit
d7066bed4b
2 changed files with 4 additions and 1 deletions
|
|
@ -819,7 +819,7 @@ describe("CodebaseIndexer", () => {
|
|||
(testIndexer as any).builtIndexes = [mockIndex1, mockIndex2];
|
||||
|
||||
const result = await testIndexer.wasIndexesChanged();
|
||||
expect(result).toBe(false);
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -716,6 +716,9 @@ export class CodebaseIndexer {
|
|||
|
||||
public async wasIndexesChanged() {
|
||||
const indexes = await this.getIndexesToBuild();
|
||||
if (indexes.length < this.builtIndexes.length) {
|
||||
return true;
|
||||
}
|
||||
return !indexes.every((index) =>
|
||||
this.builtIndexes.some(
|
||||
(builtIndex) => builtIndex.artifactId === index.artifactId,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue