diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-11-07 12:36:13 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-11-07 12:36:13 -0500 |
commit | 910cbae922ff7805947ea8b01527be1e5a27890b (patch) | |
tree | 748733ba75be8421345997cc67d305179806ab4b /IkiWiki | |
parent | 59e1f891189de563c89729d1f835ada62156b7e2 (diff) | |
download | ikiwiki-910cbae922ff7805947ea8b01527be1e5a27890b.tar ikiwiki-910cbae922ff7805947ea8b01527be1e5a27890b.tar.gz |
underlay: Avoid crashing if lists of underlays (or template directories) are not configured.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/underlay.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 51b769333..116fe7324 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -38,10 +38,14 @@ sub getsetup () { } sub checkconfig () { - foreach my $dir (@{$config{add_underlays}}) { - add_underlay($dir); + if ($config{add_underlays}) { + foreach my $dir (@{$config{add_underlays}}) { + add_underlay($dir); + } + } + if ($config{add_templates}) { + push @{$config{templatedirs}}, @{$config{add_templates}}; } - push @{$config{templatedirs}}, @{$config{add_templates}}; } 1; |