stock dash
This commit is contained in:
@@ -286,14 +286,16 @@ let isAjaxProcessing = false;
|
||||
|
||||
function ajax_request(options) {
|
||||
|
||||
if (isAjaxProcessing) {
|
||||
if (isAjaxProcessing && options.queueLock !== false) {
|
||||
// Instead of rejecting, we just return a "never-ending" promise
|
||||
// or a resolved promise that does nothing.
|
||||
console.warn("Request is busy... ignoring click.");
|
||||
return new Promise(() => { }); // This stays pending and won't trigger .then or .catch
|
||||
}
|
||||
|
||||
isAjaxProcessing = true;
|
||||
if (options.queueLock !== false) {
|
||||
isAjaxProcessing = true;
|
||||
}
|
||||
|
||||
// Auto prepare form data
|
||||
if (options.autoPrepare === true) {
|
||||
@@ -339,6 +341,7 @@ function ajax_request(options) {
|
||||
let isSendingFiles = (options.data instanceof FormData);
|
||||
|
||||
if (options.debugMode) {
|
||||
isAjaxProcessing = false;
|
||||
console.log("REQUEST DATA:", options.data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user