Skip to content

Commit

Permalink
Actually allow playing videos if api down (#3212)
Browse files Browse the repository at this point in the history
Co-authored-by: miko <[email protected]>
  • Loading branch information
keikari and miko authored Jan 21, 2025
1 parent 29db041 commit d7337d8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ui/redux/actions/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,11 @@ export function doCheckYoutubeTransfer() {
export function doFetchUserLocale(isRetry = false) {
return (dispatch) => {
fetch(LOCALE_API)
.then((res) => res.json())
.then((json) => {
.then(async (res) => {
let json = {};
try {
json = await res.json();
} catch (e) {}
const locale = json.data || {}; // [flow] local: LocaleInfo
dispatch({
type: ACTIONS.USER_FETCH_LOCALE_DONE,
Expand Down

0 comments on commit d7337d8

Please sign in to comment.