diff --git a/src/components/modals/main/settings/sections/background/Background.jsx b/src/components/modals/main/settings/sections/background/Background.jsx index b6c914d5..5ef722fd 100644 --- a/src/components/modals/main/settings/sections/background/Background.jsx +++ b/src/components/modals/main/settings/sections/background/Background.jsx @@ -30,10 +30,17 @@ export default class BackgroundSettings extends React.PureComponent { toast(this.language.toasts.reset); } - customBackground(e) { - localStorage.setItem('customBackground', e.target.result); + customBackground(e, text) { + let result; + if (text === true) { + result = e.target.value; + } else { + result = e.target.result; + } + + localStorage.setItem('customBackground', result); this.setState({ - customBackground: e.target.result + customBackground: result }); } @@ -102,7 +109,7 @@ export default class BackgroundSettings extends React.PureComponent { <>
{background.source.custom_background} {this.language.buttons.reset}
- this.customBackground(e)}> + this.customBackground(e, true)}> document.getElementById('bg-input').click()}>{background.source.upload}