]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/version.pm
add missing test to avoid uninitialised value when a page with metadata is removed
[ikiwiki.git] / IkiWiki / Plugin / version.pm
index d39fd941966b35787c32910b988b938878de4792..f96d2df06ce345d9939c356637e6e6d0e2d06e8b 100644 (file)
@@ -18,7 +18,8 @@ sub needsbuild (@) { #{{{
                        if ($pagestate{$page}{version}{shown} ne $IkiWiki::version) {
                                push @$needsbuild, $pagesources{$page};
                        }
                        if ($pagestate{$page}{version}{shown} ne $IkiWiki::version) {
                                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 version is still shown during the
                                # rebuild
                                # remove state, will be re-added if
                                # the version is still shown during the
                                # rebuild