chore: return new model instead of modifying the existing

This commit is contained in:
kolaente 2021-12-26 11:34:36 +01:00
parent cd245e467c
commit d865af58a8
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -12,8 +12,10 @@ export default class CaldavTokenService extends AbstractService {
} }
processModel(model) { processModel(model) {
model.created = formatISO(new Date(model.created)) return {
return model ...model,
created: formatISO(new Date(model.created)),
}
} }
modelFactory(data) { modelFactory(data) {