Skip to content

Commit b84ade0

Browse files
rueckstiessdurran
authored andcommitted
don't show maps if disabled in privacy settings. (#1170)
1 parent 22bc3fb commit b84ade0

File tree

1 file changed

+8
-5
lines changed
  • src/internal-packages/schema/lib/component

1 file changed

+8
-5
lines changed

src/internal-packages/schema/lib/component/field.jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const PropTypes = require('prop-types');
33
const Type = require('./type');
44
const Minichart = require('./minichart');
55
const detectCoordinates = require('detect-coordinates');
6+
const app = require('hadron-app');
67
const _ = require('lodash');
78

89
// const debug = require('debug')('mongodb-compass:schema:field');
@@ -101,11 +102,13 @@ class Field extends React.Component {
101102
* @return {Object} The possibly modified type
102103
*/
103104
getSemanticType(type) {
104-
// check if the type represents geo coordinates
105-
const coords = detectCoordinates(type);
106-
if (coords) {
107-
type.name = 'Coordinates';
108-
type.values = coords;
105+
// check if the type represents geo coordinates, if privacy settings allow
106+
if (app.isFeatureEnabled('enableMaps')) {
107+
const coords = detectCoordinates(type);
108+
if (coords) {
109+
type.name = 'Coordinates';
110+
type.values = coords;
111+
}
109112
}
110113
return type;
111114
}

0 commit comments

Comments
 (0)