1
0
mirror of https://github.com/keeweb/keeweb.git synced 2024-06-21 07:06:39 +02:00

fixed error after importing bad xml

This commit is contained in:
antelle 2017-09-29 20:35:35 +02:00
parent 34f91ac3af
commit 49b999693c

View File

@ -556,7 +556,13 @@ const OpenView = Backbone.View.extend({
this.$el.toggleClass('open--opening', true);
this.inputEl.attr('disabled', 'disabled');
this.busy = true;
this.afterPaint(this.model.importFileWithXml.bind(this.model, this.params, this.openDbComplete.bind(this)));
this.afterPaint(() => this.model.importFileWithXml(this.params, err => {
if (err) {
this.params.name = '';
this.params.fileXml = null;
}
this.openDbComplete(err);
}));
},
toggleMore: function() {