fix(core): skip undefined arg for collection migration (#12265)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Bug Fixes**
  - Improved handling of filter arguments to exclude invalid or empty values, reducing potential errors during filtering operations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
CatsJuice
2025-05-14 03:04:07 +00:00
parent 26ece014f1
commit 291bb9c449

View File

@@ -191,7 +191,7 @@ export class CollectionStore extends Store {
return filterList.map(filter => {
const leftValue = filter.left.name;
const method = filter.funcName;
const args = filter.args.map(arg => arg.value);
const args = filter.args.filter(arg => !!arg).map(arg => arg.value);
const arg0 = args[0];
if (leftValue === 'Created' || leftValue === 'Updated') {
const key = leftValue === 'Created' ? 'createdAt' : 'updatedAt';