Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1532 from owncloud/fixes_1514
Browse files Browse the repository at this point in the history
Correct return for getFolderById - fixes #1514
  • Loading branch information
ChristophWurst authored Jun 16, 2016
2 parents 7034503 + ff845cf commit a923838
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ All notable changes to this project will be documented in this file.
### Fixed
- Close popover on clicking somewhere else
[#1521](https://github.com/owncloud/mail/pull/1521) @tahaalibra
- fix email length in the database
- Fix email length in the database
[#1518](https://github.com/owncloud/mail/pull/1518) @tahaalibra
- Fix setup error 'folder is null'
[#1532](https://github.com/owncloud/mail/pull/1532) @Gomez

## 0.5.1 – 2016-05-30

Expand Down
4 changes: 2 additions & 2 deletions js/models/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ define(function(require) {
getFolderById: function(folderId) {
var folders = this.get('folders');
if (!folders) {
return null;
return undefined;
}
for (var i = 0; i < folders.length; i++) {
var result = this._getFolderByIdRecursively(folders.at(i), folderId);
if (result) {
return result;
}
}
return null;
return undefined;
},
toJSON: function() {
var data = Backbone.Model.prototype.toJSON.call(this);
Expand Down
2 changes: 1 addition & 1 deletion js/views/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ define(function(require) {
// Let's assume there's at least one account after a successful
// setup, so let's show the first one (could be the unified inbox)
var firstAccount = accounts.first();
var firstFolder = accounts.first();
var firstFolder = firstAccount.get('folders').first();
Radio.navigation.trigger('folder', firstAccount.get('accountId'), firstFolder.get('id'));
});
});
Expand Down

0 comments on commit a923838

Please sign in to comment.