You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2018/09/16 18:48:38 UTC
[incubator-superset] branch master updated: [react16] fix React
type checking (#5903)
This is an automated email from the ASF dual-hosted git repository.
beto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 9c486a3 [react16] fix React type checking (#5903)
9c486a3 is described below
commit 9c486a3b3d5b158f48f225be22404b8bb1ae1227
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Sun Sep 16 11:48:32 2018 -0700
[react16] fix React type checking (#5903)
Somehow checking the type of a JSX-defined React component is not
straightforward and changes through versions of React.
Using the `name` attr addresses the issue for now.
---
superset/assets/src/CRUD/utils.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/assets/src/CRUD/utils.js b/superset/assets/src/CRUD/utils.js
index 6de8c4b..3bf24e5 100644
--- a/superset/assets/src/CRUD/utils.js
+++ b/superset/assets/src/CRUD/utils.js
@@ -7,7 +7,7 @@ export function recurseReactClone(children, type, propExtender) {
*/
return React.Children.map(children, (child) => {
let newChild = child;
- if (child && child.type === type) {
+ if (child && child.type.name === type.name) {
newChild = React.cloneElement(child, propExtender(child));
}
if (newChild && newChild.props.children) {