Skip to content

Commit

Permalink
fix: blocking egg startup if there is no partial directory (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ylt6 authored and atian25 committed Jan 16, 2018
1 parent 535a06c commit 6d4f9b3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ const COMPILE = Symbol('compile');

module.exports = app => {
const partials = loadPartial(app);
for (const key of Object.keys(partials)) {
handlebars.registerPartial(key, partials[key]);
if (partials) {
for (const key of Object.keys(partials)) {
handlebars.registerPartial(key, partials[key]);
}
}

class HandlebarsView {
constructor(ctx) {
this.app = ctx.app;
Expand Down

0 comments on commit 6d4f9b3

Please sign in to comment.