From b07143d2762fadaf3d8344e5eb82c29f1c4ac271 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Wed, 18 Jan 2017 00:31:34 -0500 Subject: [PATCH] refactor: do not allow adding children with options passed in as a boolean (#3872) This has been deprecated throughout 5.0 and being removed. To include a child, you must use an object or false to exclude it. true will no longer be supported. BREAKING CHANGE: remove ability to add children with options as a boolean. --- src/js/component.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/js/component.js b/src/js/component.js index 6b129df8e5..373df4dc6b 100644 --- a/src/js/component.js +++ b/src/js/component.js @@ -341,21 +341,6 @@ class Component { if (typeof child === 'string') { componentName = toTitleCase(child); - // Options can also be specified as a boolean, - // so convert to an empty object if false. - if (!options) { - options = {}; - } - - // Same as above, but true is deprecated so show a warning. - if (options === true) { - log.warn('Initializing a child component with `true` is deprecated.' + - 'Children should be defined in an array when possible, ' + - 'but if necessary use an object instead of `true`.' - ); - options = {}; - } - const componentClassName = options.componentClass || componentName; // Set name through options