N°3786 - Fix unload XHR call being always sent, even when no draft entries

This commit is contained in:
Molkobain
2021-08-17 16:11:21 +02:00
parent 5651512f68
commit 007e1ded0d

View File

@@ -244,7 +244,9 @@ $(function()
}
// - Processing / cleanup when the leaving page
$(window).on('unload', function() {
return me._onUnload();
if (true === me._HasDraftEntries()) {
return me._onUnload();
}
});
// Mostly for outside clicks that should close elements