]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/comments.pm
Fix a typo in the last release.
[ikiwiki.git] / IkiWiki / Plugin / comments.pm
index de193bd12b358d2850a823c3e492af1844b4a292..f2cd8f90aa27f0a963908f587f34a57fddcecf19 100644 (file)
@@ -914,7 +914,7 @@ sub match_comment ($$;@) {
                $IkiWiki::pagesources{$page} :
                $IkiWiki::delpagesources{$page};
        my $type=IkiWiki::pagetype($source);
-       if (defined $type && $type ne "_comment") {
+       if (! defined $type || $type ne "_comment") {
                return IkiWiki::FailReason->new("$page is not a comment");
        }
 
@@ -929,7 +929,7 @@ sub match_comment_pending ($$;@) {
                $IkiWiki::pagesources{$page} :
                $IkiWiki::delpagesources{$page};
        my $type=IkiWiki::pagetype($source);
-       if (defined $type && $type ne "_comment_pending") {
+       if (! defined $type || $type ne "_comment_pending") {
                return IkiWiki::FailReason->new("$page is not a pending comment");
        }