Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Don't assume theme logo or sidebar are set
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetrovich committed Jun 10, 2018
1 parent decb1d7 commit 6a4a757
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Generator {
);

// Copies logo asset
let logo = options.theme.logo || '';
let logo = _.get(options, 'theme.logo', '');
if (logo && !logo.startsWith('http')) {
fs.copySync(
path.resolve(options.baseDir, logo),
Expand Down Expand Up @@ -151,7 +151,7 @@ class Generator {

let html = Handlebars.compile(indexTemplate)({
name: options.name,
sidebar: options.theme.sidebar,
sidebar: _.get(options, 'theme.sidebar', {}),
logo,
favicon,
groups,
Expand Down

0 comments on commit 6a4a757

Please sign in to comment.