aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-04-21 19:42:00 -0400
committerJoey Hess <joey@kitenet.net>2010-04-21 19:42:00 -0400
commit1a09cddd39d4e15c442973dc256bf91b3c27997c (patch)
tree49e456a8b239002792c2a3777c18dc17cbf86b25
parent1336a3270b664dbd548c6ad66ec981d5fa24a953 (diff)
downloadikiwiki-1a09cddd39d4e15c442973dc256bf91b3c27997c.tar
ikiwiki-1a09cddd39d4e15c442973dc256bf91b3c27997c.tar.gz
fix false positive in link_types_changed
loadindex does not bother populating oldtypedlinks if there is no link type. However, the code in link_types_changed assumed that if oldtypedlinks is not defined, and typedlinks is, they must differ.
-rw-r--r--IkiWiki/Render.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index bbf8f915e..0e5336f22 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -526,7 +526,7 @@ sub link_types_changed ($$) {
my $old = shift;
return 0 if !defined $new && !defined $old;
- return 1 if !defined $new || !defined $old;
+ return 1 if (!defined $new && %$old) || (!defined $old && %$new);
while (my ($type, $links) = each %$new) {
foreach my $link (keys %$links) {