diff --git a/assets/js/utils/local-autocompleter.js b/assets/js/utils/local-autocompleter.js index 44cd2408..95d5d93f 100644 --- a/assets/js/utils/local-autocompleter.js +++ b/assets/js/utils/local-autocompleter.js @@ -101,7 +101,7 @@ export class LocalAutocompleter { if (imageCount < 0) { // This is actually an alias, so follow it - return [ name, this.getResultAt(-imageCount)[1] ]; + return [ name, this.getResultAt(-imageCount - 1)[1] ]; } return [ name, { name, imageCount, associations } ]; diff --git a/lib/philomena/autocomplete.ex b/lib/philomena/autocomplete.ex index 839a8eed..ec5e04ec 100644 --- a/lib/philomena/autocomplete.ex +++ b/lib/philomena/autocomplete.ex @@ -75,7 +75,7 @@ defmodule Philomena.Autocomplete do if not is_nil(alias_target) do target = Map.fetch!(reference_indexes, alias_target) - <> + <> else <> end