Skip to content

Commit e28c088

Browse files
committed
fix(filter): translation error
1 parent c59cc49 commit e28c088

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# UnderScript Changelog
22

3+
## Version 0.57.1 (2024-04-05)
4+
1. Fixed collection dropdown filter translation error
5+
36
## Version 0.57.0 (2024-04-01)
47
### New Features
58
1. Added filter for tribes

src/base/library/filter.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ function allTribeButton() {
142142
}
143143

144144
function ownSelect() {
145+
if (!global('translationReady', { throws: false })) {
146+
eventManager.once('translation:loaded', () => applyLook(false));
147+
return '';
148+
}
145149
return $(`
146150
<select id="collectionType" onchange="applyFilters(); showPage(0);">
147151
<option value="all">${translateText('crafting-all-cards')}</option>
@@ -196,7 +200,7 @@ filters.push(
196200
case 'maxed': return card.quantity < max(card.rarity);
197201
case 'surplus': return card.quantity <= max(card.rarity);
198202
case 'craftable': return card.quantity >= max(card.rarity) || card.rarity === 'DETERMINATION';
199-
case 'all': // fall-through
203+
case 'all':
200204
default: break;
201205
}
202206
}

0 commit comments

Comments
 (0)