mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-22 07:03:19 +00:00
(js) Fix id assignation of new Calendar
This commit is contained in:
@@ -386,6 +386,8 @@
|
||||
* @returns a promise of the calendar id
|
||||
*/
|
||||
Calendar.prototype.$id = function() {
|
||||
var _this = this;
|
||||
|
||||
if (this.id) {
|
||||
// Object already unwrapped
|
||||
return Calendar.$q.when(this.id);
|
||||
@@ -393,6 +395,7 @@
|
||||
else {
|
||||
// Wait until object is unwrapped
|
||||
return this.$futureCalendarData.then(function(calendar) {
|
||||
_this.id = calendar.id;
|
||||
return calendar.id;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user