Fix frontend errors
This commit is contained in:
parent
5fda8b936b
commit
e71bb6d459
|
@ -117,7 +117,7 @@ class FileTree extends React.Component {
|
|||
{" " + i18next.t("store:Please choose the type of your data")}
|
||||
</div>
|
||||
}
|
||||
visible={this.state.isUploadFileModalVisible}
|
||||
open={this.state.isUploadFileModalVisible}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
isUploadFileModalVisible: false,
|
||||
|
@ -842,7 +842,11 @@ class FileTree extends React.Component {
|
|||
|
||||
getEditorHeightCss() {
|
||||
// 79, 123
|
||||
const filePaneHeight = this.filePane.current?.offsetHeight;
|
||||
let filePaneHeight = this.filePane.current?.offsetHeight;
|
||||
if (!filePaneHeight) {
|
||||
filePaneHeight = 0;
|
||||
}
|
||||
|
||||
return `calc(100vh - ${filePaneHeight + 186}px)`;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,12 +48,15 @@ if (Conf.IsDemoMode) {
|
|||
|
||||
window.fetch = async(url, option = {}) => {
|
||||
requestFilters.forEach(filter => filter(url, option));
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
originalFetch(url, option).then(res => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(res.clone());
|
||||
originalFetch(url, option)
|
||||
.then(res => {
|
||||
responseFilters.forEach(filter => filter(res.clone()));
|
||||
resolve(res);
|
||||
})
|
||||
.catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue