Closed stefan-willems-beech closed 1 year ago
Also not working under the following versions: "@datx/core": "^2.4.11", "@datx/jsonapi": "^2.4.11", "@datx/jsonapi-angular": "^2.4.11", "@datx/utils": "^2.4.8",
Fixed this issue.
Changed:
@Attribute({
map: 'created_at',
parse: (value: string) => moment(value),
serialize: (value: moment.Moment) => value?.toISOString()
}) public createdAt?: moment.Moment = null;
To:
@Attribute({
map: 'created_at',
parse: (value: string) => value ? moment(value) : null,
serialize: (value: moment.Moment) => value?.toISOString()
}) public createdAt?: moment.Moment;
Used libraries
core, jsonapi, jsonapi-angular, utils
Library version(s)
"@datx/core": "2.4.6", "@datx/jsonapi": "2.4.6", "@datx/jsonapi-angular": "2.4.7",
Sample API response (if relevant)
Environments with the issue
Chrome 109.0.5414.74, Ubuntu 22.04.1 LTS
Environments without the issue
No response
Current behavior
Current Object inside Angular.
Current Order model:
I am currently getting duplicate attributes inside my model (which is not the biggest problem, but not needed), where as the fields created_at and retrieve_at are fully ignoring the parse method given to them.
Expected behavior
Reproduction steps
No response