From d865af58a8206ecd8f1f2ed8edd767c0de37dd5a Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 26 Dec 2021 11:34:36 +0100 Subject: [PATCH] chore: return new model instead of modifying the existing --- src/services/caldavToken.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/caldavToken.js b/src/services/caldavToken.js index 2c124ade..6e439765 100644 --- a/src/services/caldavToken.js +++ b/src/services/caldavToken.js @@ -12,8 +12,10 @@ export default class CaldavTokenService extends AbstractService { } processModel(model) { - model.created = formatISO(new Date(model.created)) - return model + return { + ...model, + created: formatISO(new Date(model.created)), + } } modelFactory(data) {