renames
[webos-internals:adamrmcd-modifications.git] / email / email-update-bug-fix.patch
1 diff --git a/usr/palm/applications/com.palm.app.email/app/models/EmailAppDepot.js b/usr/palm/applications/com.palm.app.email/app/models/EmailAppDepot.js
2 index b2b1cd7..57a4157 100644
3 --- a/usr/palm/applications/com.palm.app.email/app/models/EmailAppDepot.js
4 +++ b/usr/palm/applications/com.palm.app.email/app/models/EmailAppDepot.js
5 @@ -47,6 +47,7 @@ var EmailAppDepot = Class.create({
6                 if (accounts.list !== undefined && this.numAccounts !== accounts.list.length) {
7                         // look for accounts that have been removed
8                         var removedAccounts = [];
9 +      if (this.accounts.list) {
10                         this.accounts.list.each(function(existingAcct){
11                                 var stillExists = false;
12                                 accounts.list.each(function(newAcct) {
13 @@ -59,6 +60,7 @@ var EmailAppDepot = Class.create({
14                                         removedAccounts.push(existingAccnt);
15                                 }
16                         });
17 +      }
18                         if (removedAccounts.length > 0) {
19                                 // delete the security policy that are associated with the deleted
20                                 // accounts.