Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View renders blank when no layout #73

Closed
knownasilya opened this issue Aug 8, 2014 · 3 comments
Closed

View renders blank when no layout #73

knownasilya opened this issue Aug 8, 2014 · 3 comments

Comments

@knownasilya
Copy link

Here's my config (I'm using express4):

app.set('views', path.join(__dirname, '..', 'dist'));
app.set('view engine', 'html');
app.engine('html', handlebars({
  extname: '.html'
}));

See runnable (broken).
Workaround
There are no errors, just a blank html page and the DOM looks generic. Previously when I ran it with incorrect paths or extensions I got errors.

Looks like if there is no layout (even { layout: false }) then you don't return anything here.

@knownasilya knownasilya changed the title View renders blank View renders blank when no layout Aug 8, 2014
@ericf
Copy link
Owner

ericf commented Aug 8, 2014

Yeah, this is a bug. I need to return body when there's no layout.

@ericf ericf closed this as completed in e9db605 Aug 8, 2014
@ericf
Copy link
Owner

ericf commented Aug 8, 2014

I published v1.0.1 which fixes this. Thanks for reporting it!

@knownasilya
Copy link
Author

@ericf thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants