Don't clobber the ready state if the sdk isn't ready yet

This commit is contained in:
David Baker 2015-08-14 10:31:09 +01:00
parent a3879b507a
commit e5099ce3b7

View File

@ -280,10 +280,10 @@ module.exports = {
if (roomString[0] == '#') {
var self = this;
MatrixClientPeg.get().getRoomIdForAlias(roomString).done(function(result) {
self.setState({ready: true});
if (self.sdkReady) self.setState({ready: true});
defer.resolve(result.room_id);
}, function() {
self.setState({ready: true});
if (self.sdkReady) self.setState({ready: true});
defer.resolve(null);
});
this.setState({ready: false});