Commit b08ae93
authored
raidemulator: fix inconsistent ParserLanguage (#920)
`ParserLanguage` should depend on the result of `browserLanguagesToLang`
when the user is **not** connected to WebSocket.
Feature initially implemented in quisquous#2970.
Changes in quisquous#3029 set the default behavior to `en`, making the `if
(enc.language)` condition always evaluate to `true`.
---
[ui\raidboss\emulator\data\Encounter.ts#L46](https://github.com/OverlayPlugin/cactbot/blob/main/ui/raidboss/emulator/data/Encounter.ts#L46)
```typescript
language: Lang = 'en'; // ← this
```
---
Not sure about potential side effects; would appreciate a review from
@valarnin.
---
**Added**: This also fixes an issue where `setCurrent` incorrectly calls
`setParserLanguage("en")` when `enc.language` is not defined within the
log segment.1 parent 7df3065 commit b08ae93
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments