diff options
Diffstat (limited to 'application/palemoon/components/migration/MigrationUtils.jsm')
-rw-r--r-- | application/palemoon/components/migration/MigrationUtils.jsm | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/application/palemoon/components/migration/MigrationUtils.jsm b/application/palemoon/components/migration/MigrationUtils.jsm index 243bf098a..4461b8af0 100644 --- a/application/palemoon/components/migration/MigrationUtils.jsm +++ b/application/palemoon/components/migration/MigrationUtils.jsm @@ -177,11 +177,12 @@ this.MigratorPrototype = { */ getMigrateData: function MP_getMigrateData(aProfile) { // Tycho: let types = [r.type for each (r in this._getMaybeCachedResources(aProfile))]; - let resources = this._getMaybeCachedResources(aProfile); - if (!resources) { - return []; + let types = []; + + for each (r in this._getMaybeCachedResources(aProfile)) { + types.push(r.type); } - let types = resources.map(r => r.type); + return types.reduce(function(a, b) a |= b, 0); }, @@ -196,10 +197,15 @@ this.MigratorPrototype = { if (resources.length == 0) throw new Error("migrate called for a non-existent source"); - if (aItems != Ci.nsIBrowserProfileMigrator.ALL) { + if (aItems != Ci.nsIBrowserProfileMigrator.ALL) // Tycho: resources = [r for each (r in resources) if (aItems & r.type)]; - resources = resources.filter(r => aItems & r.type); - } + resources = []; + + for each (r in resources) { + if (aItems & r.type) { + resources.push(r); + } + } // Called either directly or through the bookmarks import callback. function doMigrate() { |