fix: sideload tab and file uploads

This commit is contained in:
David Ralph
2022-07-28 12:41:42 +01:00
parent d21df83278
commit 45d5a3b9d7
3 changed files with 5 additions and 3 deletions

View File

@@ -14,7 +14,9 @@ export default class FileUpload extends PureComponent {
if (this.props.type === 'settings') {
reader.readAsText(file, 'UTF-8');
return this.props.loadFunction(e);
reader.onload = (e) => {
return this.props.loadFunction(e.target.result);
}
} else {
// background upload
const settings = {};