From 11ac67f3ebbcda6994d0f72967e0a50bb1cfa0b1 Mon Sep 17 00:00:00 2001
From: Shane Tomlinson <stomlinson@mozilla.com>
Date: Thu, 2 Feb 2012 12:57:49 +0000
Subject: [PATCH] Fix include.js being served from the production directory in
 dev mode.

The change to the new config busted the way include.js was served.  Instead of checking which env is being used, check whether the user wants to use minified resources.  If they do, serve up the compressed include.js, if not, serve up the debug version.

close #1027
close #1035
---
 lib/browserid/views.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/browserid/views.js b/lib/browserid/views.js
index 819d8b271..d87269bd1 100644
--- a/lib/browserid/views.js
+++ b/lib/browserid/views.js
@@ -52,10 +52,9 @@ exports.setup = function(app) {
   });
 
   app.get('/include.js', function(req, res, next) {
-    var env = config.get('env');
-
     req.url = "/include_js/include.js";
-    if (env === 'production') {
+
+    if (config.get('use_minified_resources') === true) {
       req.url = "/production/include.js"
     }
 
-- 
GitLab