File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export const init = async (): Promise<void> => {
24
24
const language = localStorage . getItem ( 'language' ) ?? 'en'
25
25
26
26
const response = await fetch ( `./translations/${ language } .json` )
27
+ . catch ( ( ) => fetch ( `https://synergism.cc/translations/${ language } .json` ) )
27
28
const file = await response . json ( ) as Resource
28
29
29
30
languageCache . set ( language , { translation : file } )
@@ -32,6 +33,7 @@ export const init = async (): Promise<void> => {
32
33
if ( language !== 'en' ) {
33
34
// We always need to load English, to use as a fallback
34
35
const response = await fetch ( './translations/en.json' )
36
+ . catch ( ( ) => fetch ( 'https://synergism.cc/translations/en.json' ) )
35
37
const file = await response . json ( ) as Resource
36
38
37
39
languageCache . set ( 'en' , { translation : file } )
Original file line number Diff line number Diff line change @@ -34,11 +34,11 @@ const initializeConsumablesTab = memoize(() => {
34
34
const alert = await Confirm ( `Please confirm you would like to activate a ${ key } for 500 PseudoCoins` )
35
35
if ( ! alert ) return Alert ( 'Purchase cancelled' )
36
36
else {
37
- sendToWebsocket ( JSON . stringify ( {
38
- type : 'consume' ,
39
- consumable : key
40
- } ) )
41
- }
37
+ sendToWebsocket ( JSON . stringify ( {
38
+ type : 'consume' ,
39
+ consumable : key
40
+ } ) )
41
+ }
42
42
} )
43
43
} )
44
44
} )
You can’t perform that action at this time.
0 commit comments