mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user