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/calendar.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'IkiWiki/Plugin/calendar.pm') diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index 4bb4c2c21..aed087eed 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -390,7 +390,8 @@ sub needsbuild (@) { #{{{ # the current day push @$needsbuild, $pagesources{$page}; } - if (grep { $_ eq $pagesources{$page} } @$needsbuild) { + if (exists $pagesources{$page} && + grep { $_ eq $pagesources{$page} } @$needsbuild) { # remove state, will be re-added if # the calendar is still there during the # rebuild -- cgit v1.2.3