Prevent error message spam when navigating away before the page has completely loaded

This commit is contained in:
Bernd Bestel 2019-09-22 09:36:28 +02:00
parent 4c57bf8b9d
commit f7c4662e2b
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -442,7 +442,10 @@ $(".user-setting-control").on("change", function()
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
if (!xhr.statusText.isEmpty())
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
}
}
);
});