X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/fa354167bb9addab130e6a89eb845d5bc798c35e..14de1d87eff9b3a28435103f1efed2cb0972ec3d:/IkiWiki/Plugin/comments.pm diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index de193bd12..f2cd8f90a 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -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"); }