← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cristiangsp/launchpad:fixing-widgetsjs-linting into launchpad:master

 

Cristian Gonzalez has proposed merging ~cristiangsp/launchpad:fixing-widgetsjs-linting into launchpad:master.

Commit message:
Fixing widgets.js linting

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cristiangsp/launchpad/+git/launchpad/+merge/406985

Fixing widgets.js linting
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cristiangsp/launchpad:fixing-widgetsjs-linting into launchpad:master.
diff --git a/lib/lp/registry/javascript/distroseries/widgets.js b/lib/lp/registry/javascript/distroseries/widgets.js
index db4c9eb..cf22fbc 100644
--- a/lib/lp/registry/javascript/distroseries/widgets.js
+++ b/lib/lp/registry/javascript/distroseries/widgets.js
@@ -436,11 +436,15 @@ Y.extend(ArchitecturesChoiceListWidget, formwidgets.ChoiceListWidget, {
         }
         var ds;
         for (ds in this._archindep_tags) {
-            var arch_tag = this._archindep_tags[ds];
-            var i = 0;
-            for (i; i<choices.length; i++) {
-                if (Y.Lang.isValue(choices[i]) && choices[i] === arch_tag) {
-                    return true;
+            if (
+                Object.prototype.hasOwnProperty.call(this._archindep_tags, ds)
+            ) {
+                var arch_tag = this._archindep_tags[ds];
+                var i = 0;
+                for (i; i<choices.length; i++) {
+                    if (Y.Lang.isValue(choices[i]) && choices[i] === arch_tag) {
+                        return true;
+                    }
                 }
             }
         }