summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/edittemplate.pm
diff options
context:
space:
mode:
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