fix collection history export in libraries

This commit is contained in:
Oleg Zharkov
2021-03-15 19:05:04 +02:00
parent 256474c2ef
commit 7e0c298dea
@@ -91,11 +91,12 @@ var ImportCollectionModal = Backbone.View.extend({
const new_history_name = this.modal.$("input[name=history_name]").val();
if (new_history_name !== "") {
this.createNewHistory(new_history_name)
.done((new_history) => {
.then((new_history) => {
Toast.success("History created");
this.collectionImport(collection_elements, new_history.id, new_history.name);
})
.fail((xhr, status, error) => {
.catch((error) => {
console.error(error);
Toast.error("An error occurred.");
});
} else {