Bug 1460001 - Follow-up: fix linting issue. rs=bustage-fix
authorPhilipp Kewisch <mozilla@kewis.ch>
Thu, 08 Nov 2018 22:08:07 +0100
changeset 33678 a286542912546c3dc22761d1dd6a7939623c6635
parent 33677 24e632421a17a766666f4653b767781cb0753fa4
child 33679 f025f3714b775a0f1f251854b1619662b545bdc3
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersbustage-fix
bugs1460001
Bug 1460001 - Follow-up: fix linting issue. rs=bustage-fix
calendar/base/src/calAlarm.js
--- a/calendar/base/src/calAlarm.js
+++ b/calendar/base/src/calAlarm.js
@@ -593,20 +593,20 @@ calAlarm.prototype = {
             return this.mProperties.get(name);
         }
     },
 
     setProperty: function(aName, aValue) {
         this.ensureMutable();
         let name = aName.toUpperCase();
         if (name in this.promotedProps) {
-            if (this.promotedProps[name] !== true) {
+            if (this.promotedProps[name] === true) {
+                cal.WARN(`Attempted to set complex property ${name} to a simple value ${aValue}`);
+            } else {
                 this[this.promotedProps[name]] = aValue;
-            } else {
-                cal.WARN(`Attempted to set complex property ${name} to a simple value ${aValue}`);
             }
         } else {
             this.mProperties.set(name, aValue);
         }
         return aValue;
     },
 
     deleteProperty: function(aName) {