updating to disable debug info when environment name is set to production

This commit is contained in:
ppisljar 2016-08-04 12:02:00 +02:00
parent 39728089d1
commit 268fdb5cbe
2 changed files with 4 additions and 2 deletions

View file

@ -69,7 +69,7 @@ export default async (kbnServer, server, config) => {
buildSha: config.get('pkg.buildSha'),
basePath: config.get('server.basePath'),
serverName: config.get('server.name'),
devMode: config.get('env.dev'),
envName: config.get('env.name'),
uiSettings: {
defaults: await server.uiSettings().getDefaults(),
user: {}

View file

@ -34,7 +34,9 @@ module.exports = function (chrome, internals) {
}()))
.config(chrome.$setupXsrfRequestInterceptor)
.config(['$compileProvider', function ($compileProvider) {
if (!internals.devMode) $compileProvider.debugInfoEnabled(false);
if (internals.envName === 'production') {
$compileProvider.debugInfoEnabled(false);
}
}])
.run(($location, $rootScope, Private) => {
chrome.getFirstPathSegment = () => {