Skip to content

Commit

Permalink
updating to disable debug info when environment name is set to produc…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
ppisljar committed Oct 29, 2016
1 parent 3972808 commit 268fdb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down
4 changes: 3 additions & 1 deletion src/ui/public/chrome/api/angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down

0 comments on commit 268fdb5

Please sign in to comment.