From 9a0ae06c87bbb1107ca7104286a7f4eb9585a47a Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Wed, 14 Jul 2021 21:04:51 +0200 Subject: [PATCH] #143 --- plugins/dbgate-plugin-mongo/src/frontend/driver.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/dbgate-plugin-mongo/src/frontend/driver.js b/plugins/dbgate-plugin-mongo/src/frontend/driver.js index c349b34a..5eed31e5 100644 --- a/plugins/dbgate-plugin-mongo/src/frontend/driver.js +++ b/plugins/dbgate-plugin-mongo/src/frontend/driver.js @@ -1,3 +1,4 @@ +const _isString = require('lodash/isString'); const { driverBase } = global.DBGATE_TOOLS; const Dumper = require('./Dumper'); const { noSplitSplitterOptions } = require('dbgate-query-splitter/lib/options'); @@ -5,7 +6,7 @@ const { noSplitSplitterOptions } = require('dbgate-query-splitter/lib/options'); const mongoIdRegex = /^[0-9a-f]{24}$/; function getConditionPreview(condition) { - if (condition && _.isString(condition._id) && condition._id.match(mongoIdRegex)) { + if (condition && _isString(condition._id) && condition._id.match(mongoIdRegex)) { return `{ _id: ObjectId('${condition._id}') }`; } return JSON.stringify(condition);