Skip to content

Commit

Permalink
fix broken sprites when searching
Browse files Browse the repository at this point in the history
  • Loading branch information
JoakimThorsen committed Jan 4, 2025
1 parent cf222a2 commit d17d5ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/outputHandler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,13 @@ function header_outputter(page, entry_header) {
function table_body_generator(output_data, page, search) {
let append_string = "";
output_data.forEach(entry => {
const sprite = data.sprites[entry[page]] ?? ["block-sprite", -240, -16]; // defaluts to the air sprite
if (search) {
entry[page] = highlight_search_string(entry[page], search)
if(typeof entry.variants !== 'undefined') {
entry.variants = highlight_search_string(entry.variants, search)
}
}
const sprite = data.sprites[entry[page]] ?? ["block-sprite", -240, -16]; // defaluts to the air sprite
append_string += /*html*/`
<tr>
<td>
Expand Down

0 comments on commit d17d5ca

Please sign in to comment.