close modal by templateName

This commit is contained in:
Gwen 2015-08-06 21:55:57 +02:00
parent 58f99804f6
commit e853bfdf20

View file

@ -38,7 +38,7 @@ IonModal = {
this.templateClosed = templateName;
Meteor.setTimeout(function () {
var templateName = this.templateClosed || this.views[this.views.length-1];
var templateName = this.templateClosed || this.views.slice(-1)[0];
delete this.templateClosed;
var view = (this.view[templateName] || []).slice(-1)[0];