summaryrefslogtreecommitdiff
path: root/src/client/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/scripts')
-rw-r--r--src/client/scripts/paging.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/scripts/paging.ts b/src/client/scripts/paging.ts
index 832f0720e0..006d23875c 100644
--- a/src/client/scripts/paging.ts
+++ b/src/client/scripts/paging.ts
@@ -74,10 +74,6 @@ export default (opts) => ({
},
methods: {
- updateItem(i, item) {
- Vue.set((this as any).items, i, item);
- },
-
reload() {
this.items = [];
this.init();
@@ -94,6 +90,9 @@ export default (opts) => ({
...params,
limit: this.pagination.noPaging ? (this.pagination.limit || 10) : (this.pagination.limit || 10) + 1,
}).then(items => {
+ for (const item of items) {
+ Object.freeze(item);
+ }
if (!this.pagination.noPaging && (items.length > (this.pagination.limit || 10))) {
items.pop();
this.items = this.pagination.reversed ? [...items].reverse() : items;
@@ -130,6 +129,9 @@ export default (opts) => ({
untilId: this.items[this.items.length - 1].id,
}),
}).then(items => {
+ for (const item of items) {
+ Object.freeze(item);
+ }
if (items.length > SECOND_FETCH_LIMIT) {
items.pop();
this.items = this.pagination.reversed ? [...items].reverse().concat(this.items) : this.items.concat(items);