summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/edittemplate.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-01-29 17:36:25 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-01-29 17:36:25 -0500
commit7a40bcab9a223d29189632cb05d26bc558927520 (patch)
tree81d9dd804df87e93ee817c79fdc7f57cd1fbe416 /IkiWiki/Plugin/edittemplate.pm
parent0a4cd38d615574143d1e5b3b9c36efef9e7ce0e4 (diff)
add missing test to avoid uninitialised value when a page with metadata is removed
Diffstat (limited to 'IkiWiki/Plugin/edittemplate.pm')
-rw-r--r--IkiWiki/Plugin/edittemplate.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm
index aa72b0845..b7651ce02 100644
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
@@ -21,7 +21,8 @@ sub needsbuild (@) { #{{{
foreach my $page (keys %pagestate) {
if (exists $pagestate{$page}{edittemplate}) {
- if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
+ if (exists $pagesources{$page} &&
+ grep { $_ eq $pagesources{$page} } @$needsbuild) {
# remove state, it will be re-added
# if the preprocessor directive is still
# there during the rebuild