Merge pull request #2089 from isocolsky/remove_profile

Remove profile
This commit is contained in:
Matias Alejo Garcia 2014-12-12 10:15:30 -03:00
commit 57b98d24d4
7 changed files with 42 additions and 10 deletions

View file

@ -356,8 +356,13 @@ Identity.prototype.remove = function(opts, cb) {
self.storage.removeItem(self.getId(), function(err) {
if (err) return cb(err);
self.emitAndKeepAlive('closed');
return cb();
self.storage.clear(function (err) {
if (err) return cb(err);
self.emitAndKeepAlive('closed');
return cb();
});
});
});
};