Fix parsing for last edited time on Notion node (#1861)

This commit is contained in:
Iván Ovejero 2021-06-04 01:10:27 +02:00 committed by GitHub
parent e4bac15d05
commit fe354baa55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -314,7 +314,11 @@ export function mapFilters(filters: IDataObject[], timezone: string) {
// tslint:disable-next-line: no-any
return filters.reduce((obj, value: { [key: string]: any }) => {
let key = getNameAndType(value.key).type;
let valuePropertyName = value[`${camelCase(key)}Value`];
let valuePropertyName = key === 'last_edited_time'
? value[camelCase(key)]
: value[`${camelCase(key)}Value`];
if (['is_empty', 'is_not_empty'].includes(value.condition as string)) {
valuePropertyName = true;
} else if (['past_week', 'past_month', 'past_year', 'next_week', 'next_month', 'next_year'].includes(value.condition as string)) {