Skip to content

Commit

Permalink
Wording "Awaay. 找不到。" in searches_api and application.js
Browse files Browse the repository at this point in the history
  • Loading branch information
wildjcrt committed Sep 13, 2024
1 parent fda7d9f commit 795e8dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/api/v2/searches_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SearchesAPI < Base
result.sort_by { |element| element[:term].size }
else
[ {
term: "Awaay to. 找不到",
term: "Awaay. 找不到",
description: ""
} ]
end
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $( "#search" ).autocomplete({
return false;
},
select: function( event, ui ) {
if ((ui.item.term !== "Awaay to. 找不到") && (ui.item.term.indexOf("精確搜尋,結果較少") === -1)) {
if ((ui.item.term !== "Awaay. 找不到") && (ui.item.term.indexOf("精確搜尋,結果較少") === -1)) {
this.value = ui.item.term;
window.location.href = `/terms/${ui.item.term}`;
}
Expand All @@ -23,7 +23,7 @@ $( "#search" ).autocomplete({
}).autocomplete( "instance" )._renderItem = function( ul, item ) {
var divHtml;

if ((item.term !== "Awaay to. 找不到") && (item.term.indexOf("精確搜尋,結果較少") === -1)) {
if ((item.term !== "Awaay. 找不到") && (item.term.indexOf("精確搜尋,結果較少") === -1)) {
divHtml = `<div class="flex justify-between ui-menu-item-wrapper px-2 py-0.5 text-gray-600 hover:bg-gray-200">
<div class"text-sm font-medium text-indigo-600">${item.term}</div>
<div class="text-sm text-gray-500 mt-1 sm:mt-0">${item.description}</div>
Expand Down

0 comments on commit 795e8dd

Please sign in to comment.