Skip to content

Commit

Permalink
Prevent JS crash on new text for missing select2 loading
Browse files Browse the repository at this point in the history
  • Loading branch information
melmothx committed Apr 4, 2024
1 parent 9c1219a commit a55bfe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/AmuseWikiFarm/Controller/Edit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ sub newtext :Chained('root') :PathPart('new') :Args(0) {
$c->stash(
nav => 'add-to-library',
page_title => $c->loc('Add a new text'),
load_select2 => 1,
);

my $site = $c->stash->{site};
Expand Down Expand Up @@ -172,7 +173,6 @@ sub newtext :Chained('root') :PathPart('new') :Args(0) {
}
Dlog_debug { "Nodes are $_" } $nodes;
$c->stash(
load_select2 => 1,
node_selections => $nodes,
);
}
Expand Down

0 comments on commit a55bfe6

Please sign in to comment.