Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2022-08-09 17:33:25 +0300
committerMarcel Klehr <mklehr@gmx.net>2022-08-23 15:10:56 +0300
commit14fc150a253a96ed09c016712aeb2a893a1e9363 (patch)
tree62ea7a3b56ff37351a1f76b8f824adfa3a7c9e65
parent6999be2e773f2f6ce0b90abf4303128ea91a2f24 (diff)
Use Object.freeze to make some objects read only
Signed-off-by: Louis Chemineau <louis@chmn.me>
-rw-r--r--src/store/files.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/store/files.js b/src/store/files.js
index 278516fb..b38fe2ba 100644
--- a/src/store/files.js
+++ b/src/store/files.js
@@ -58,10 +58,10 @@ const mutations = {
file.day = moment(file.lastmod).format('MMDD') // For On this day
})
- state.files = {
+ state.files = Object.freeze({
...state.files,
...newFiles.reduce((files, file) => ({ ...files, [file.fileid]: file }), {}),
- }
+ })
},
/**