From c8d32ddd1437efe65b76e67b6f14435c04e9737a Mon Sep 17 00:00:00 2001 From: Stephen Hess Date: Mon, 10 Oct 2016 16:21:05 -0400 Subject: [PATCH] moved `require`'d pelias-labels to "global" --- middleware/assignLabels.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;