diff --git a/middleware/assignLabels.js b/middleware/assignLabels.js index d10cad69..26d15e29 100644 --- a/middleware/assignLabels.js +++ b/middleware/assignLabels.js @@ -1,6 +1,8 @@ +var defaultLabelGenerator = require('pelias-labels'); + function setup(labelGenerator) { function middleware(req, res, next) { - return assignLabel(req, res, next, labelGenerator || require('pelias-labels')); + return assignLabel(req, res, next, labelGenerator || defaultLabelGenerator); } return middleware;