Skip to content

Commit

Permalink
Better warnings for layout configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Saint-Roch committed Nov 27, 2014
1 parent dbb8166 commit 82ac2a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hooks/views/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module.exports = function configure ( sails ) {
sails.config.views.layout = 'layout.' + sails.config.views.engine.ext;
}

if ( !sails.config.views.layout ) {
if ( sails.config.views.engine.ext !== 'ejs' && sails.config.views.engine.ext !== 'handlebars' && sails.config.views.layout ) {
sails.log.warn('Sails\' built-in layout support only works with the `ejs` and `handlebars` view engines.');
sails.log.warn('You\'re using `'+ sails.config.views.engine.ext +'`.');
sails.log.warn('Ignoring `sails.config.views.layout`...');
Expand Down

0 comments on commit 82ac2a8

Please sign in to comment.