From 7a40bcab9a223d29189632cb05d26bc558927520 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 29 Jan 2008 17:36:25 -0500 Subject: add missing test to avoid uninitialised value when a page with metadata is removed --- IkiWiki/Plugin/edittemplate.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'IkiWiki/Plugin/edittemplate.pm') 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 -- cgit v1.2.3