diff --git a/lib/less/browser.js b/lib/less/browser.js index e5a1dce2b..beeb82c06 100644 --- a/lib/less/browser.js +++ b/lib/less/browser.js @@ -8,7 +8,8 @@ var isFileProtocol = /^(file|chrome(-extension)?|resource|qrc|app):/.test(locati less.env = less.env || (location.hostname == '127.0.0.1' || location.hostname == '0.0.0.0' || location.hostname == 'localhost' || - location.port.length > 0 || + (location.port && + location.port.length > 0) || isFileProtocol ? 'development' : 'production');