hamzus-ui 0.0.230 → 0.0.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils/request.js +2 -4
package/package.json
CHANGED
package/src/utils/request.js
CHANGED
|
@@ -47,13 +47,11 @@ export function sendRequest(request) {
|
|
|
47
47
|
} else if (xhr.status === 401) {
|
|
48
48
|
if (!isRetry && config.on401 != null) {
|
|
49
49
|
if (!on401Promise) {
|
|
50
|
-
//
|
|
51
|
-
|
|
52
|
-
on401Promise = (result instanceof Promise ? result : Promise.resolve())
|
|
50
|
+
// on401 retourne forcément une promesse (async)
|
|
51
|
+
on401Promise = Promise.resolve(config.on401())
|
|
53
52
|
.finally(() => { on401Promise = null; });
|
|
54
53
|
}
|
|
55
54
|
if (config.replayAfter401 === true) {
|
|
56
|
-
// On attend la fin du on401 (le nôtre ou celui d'un autre)
|
|
57
55
|
on401Promise.then(() => executeRequest(true));
|
|
58
56
|
return;
|
|
59
57
|
}
|