Ver Fonte

return true/false on success of child add/remove

Adam Shaw há 8 anos atrás
pai
commit
a16873833f
1 ficheiros alterados com 8 adições e 0 exclusões
  1. 8 0
      src/component/DateComponent.js

+ 8 - 0
src/component/DateComponent.js

@@ -66,7 +66,11 @@ var DateComponent = FC.DateComponent = Component.extend({
 			if (this.has('businessHourGenerator')) {
 				this.setBusinessHourGeneratorInChild(this.get('businessHourGenerator'), child);
 			}
+
+			return true;
 		}
+
+		return false;
 	},
 
 
@@ -75,7 +79,11 @@ var DateComponent = FC.DateComponent = Component.extend({
 			delete this.childrenByUid[child.uid];
 
 			this.stopListeningTo(child);
+
+			return true;
 		}
+
+		return false;
 	},