From 7e0c298deab1fe888361732b7fb0450047082f8f Mon Sep 17 00:00:00 2001 From: Oleg Zharkov Date: Mon, 15 Mar 2021 19:05:04 +0200 Subject: [PATCH] fix collection history export in libraries --- .../TopToolbar/import-to-history/import-collection.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js b/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js index 62386460384..2ba09468892 100644 --- a/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js +++ b/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js @@ -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 {