From 24e5cd67dd5a3a5ba23b121aae1ef6a0e02cbf63 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sun, 24 Mar 2024 17:02:17 +0200 Subject: [PATCH] pagination warning fix --- client/src/views/record/list-pagination.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/src/views/record/list-pagination.js b/client/src/views/record/list-pagination.js index 12a05f1635..b6e2dcc459 100644 --- a/client/src/views/record/list-pagination.js +++ b/client/src/views/record/list-pagination.js @@ -58,7 +58,14 @@ class RecordListPagination extends View { } setup() { - this.listenTo(this.collection, 'sync', () => this.reRender()); + this.listenTo(this.collection, 'sync', () => { + if (!this.element) { + // A hack. Prevents warnings in console. + return; + } + + this.reRender(); + }); } }