Commit 9e0dabe68dcd325df2a528e3e94ae6787829144e
- Diff rendering mode:
- inline
- side by side
email/update-bug-fix.patch
(12 / 5)
|   | |||
| 1 | 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..4e4e29b 100644 | ||
| 2 | index b2b1cd7..57a4157 100644 | ||
| 3 | 3 | --- a/usr/palm/applications/com.palm.app.email/app/models/EmailAppDepot.js | |
| 4 | 4 | +++ b/usr/palm/applications/com.palm.app.email/app/models/EmailAppDepot.js | |
| 5 | @@ -47,7 +47,7 @@ var EmailAppDepot = Class.create({ | ||
| 5 | @@ -47,6 +47,7 @@ var EmailAppDepot = Class.create({ | ||
| 6 | 6 | if (accounts.list !== undefined && this.numAccounts !== accounts.list.length) { | |
| 7 | 7 | // look for accounts that have been removed | |
| 8 | 8 | var removedAccounts = []; | |
| 9 | - this.accounts.list.each(function(existingAcct){ | ||
| 10 | + accounts.list.each(function(existingAcct){ | ||
| 9 | + if (this.accounts.list) { | ||
| 10 | this.accounts.list.each(function(existingAcct){ | ||
| 11 | 11 | var stillExists = false; | |
| 12 | 12 | accounts.list.each(function(newAcct) { | |
| 13 | if (existingAcct.originalLogin === newAcct.originalLogin) { | ||
| 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. |

