From 739205c19244e3d92bb65b156d327324be645451 Mon Sep 17 00:00:00 2001 From: Jacob O'Keeffe Date: Wed, 10 Jul 2024 16:30:19 +0100 Subject: [PATCH] Fix error when mongo collstats not supported --- plugins/dbgate-plugin-mongo/src/backend/Analyser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dbgate-plugin-mongo/src/backend/Analyser.js b/plugins/dbgate-plugin-mongo/src/backend/Analyser.js index dcc8e666..8799f6c2 100644 --- a/plugins/dbgate-plugin-mongo/src/backend/Analyser.js +++ b/plugins/dbgate-plugin-mongo/src/backend/Analyser.js @@ -33,7 +33,7 @@ class Analyser extends DatabaseAnalyser { collections: [ ...collections.map((x, index) => ({ pureName: x.name, - tableRowCount: stats[index].count, + tableRowCount: stats[index]?.count, })), ...views.map((x, index) => ({ pureName: x.name,