mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
Improve termsOfUse UI and error handling
This commit is contained in:
@ -50,11 +50,15 @@ window.fetch = async(url, option = {}) => {
|
||||
requestFilters.forEach(filter => filter(url, option));
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
originalFetch(url, option).then(res => {
|
||||
if (!url.startsWith("/api/get-organizations")) {
|
||||
responseFilters.forEach(filter => filter(res.clone()));
|
||||
}
|
||||
resolve(res);
|
||||
});
|
||||
originalFetch(url, option)
|
||||
.then(res => {
|
||||
if (!url.startsWith("/api/get-organizations")) {
|
||||
responseFilters.forEach(filter => filter(res.clone()));
|
||||
}
|
||||
resolve(res);
|
||||
})
|
||||
.catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user