Skip to content

Commit

Permalink
Make geojson-utils a strong dependency of minimongo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava committed Oct 7, 2013
1 parent 3b26a51 commit 7c9122e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/minimongo/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Package.on_use(function (api) {
api.export('LocalCollection');
api.use(['underscore', 'json', 'ejson', 'ordered-dict', 'deps',
'random', 'ordered-dict']);
// If you really want geolocation queries to work, add this package
api.use('geojson-utils', { weak: true });
// This package is used for geo-location queries such as $near
api.use('geojson-utils');
api.add_files([
'minimongo.js',
'selector.js',
Expand Down
2 changes: 0 additions & 2 deletions packages/minimongo/selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,6 @@ var VALUE_OPERATORS = {
dist = distanceCoordinatePairs(point, value);
break;
case "2dsphere":
if (!_.has(Package, 'geojson-utils'))
throw new Error('Need geojson-utils package for GeoJSON calculations (such as $near)');
var GeoJSON = Package['geojson-utils'].GeoJSON;
// XXX: for now, we don't calculate the actual distance between, say,
// polygon and circle. If people care about this use-case it will get
Expand Down

0 comments on commit 7c9122e

Please sign in to comment.