aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/edittemplate.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/edittemplate.pm')
-rw-r--r--IkiWiki/Plugin/edittemplate.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm
index 576c94be4..061242fd8 100644
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
@@ -107,9 +107,11 @@ sub formbuilder (@) {
my $template=$pagestate{$registering_page}{edittemplate}{$pagespec};
$form->field(name => "editcontent",
value => filltemplate($template, $page));
- $form->field(name => "type",
- value => pagetype($pagesources{$template}))
+ my $type=pagetype($pagesources{$template})
if $pagesources{$template};
+ $form->field(name => "type",
+ value => $type)
+ if defined $type;
return;
}
}