parent
e16d80d9a2
commit
b14667ae40
2 changed files with 25 additions and 10 deletions
|
@ -104,7 +104,14 @@
|
|||
conversation.fetch().then(function() {
|
||||
resolve(conversation);
|
||||
}, function() {
|
||||
conversation.save().then(function() {
|
||||
var deferred = conversation.save();
|
||||
|
||||
if (!deferred) {
|
||||
console.log('Conversation save failed! ', id, type);
|
||||
return reject(new Error('findOrCreateById: Conversation save failed'));
|
||||
}
|
||||
|
||||
deferred.then(function() {
|
||||
resolve(conversation);
|
||||
}, reject);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue