sefiutils 1.0.55 → 1.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,13 +38,19 @@ function createComponentNode(fiber/* : Fiber */, parent/* : ComponentNode|undefi
38
38
  node.kind = "null";
39
39
  node.name = "null";
40
40
  if (debugType) {
41
- node.name = normalizeNodeName(debugType.displayName);
41
+ if (debugType.displayName) {
42
+ node.name = normalizeNodeName(debugType.displayName);
43
+ }
42
44
  if (typeof debugType.render === 'function') {
43
45
  node.type = "function";
44
46
  }
45
47
  }
46
48
  } else if (typeof fiber.type === "function") {
47
- node.name = normalizeNodeName(fiber.type.name);
49
+ if (fiber.type.name) {
50
+ node.name = normalizeNodeName(fiber.type.name);
51
+ } else {
52
+ node.name = "anonymous";
53
+ }
48
54
  node.kind = "function";
49
55
 
50
56
  node.props = getProps(fiber);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sefiutils",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "description": "Utilities (and Jest tests) for Selenium Webdriver Tests and some React tools as well",
5
5
  "author": "Jens von Pilgrim <jens.vonpilgrim@bht-berlin.de>",
6
6
  "license": "EPL-2.0",
@@ -38,13 +38,19 @@ function createComponentNode(fiber/* : Fiber */, parent/* : ComponentNode|undefi
38
38
  node.kind = "null";
39
39
  node.name = "null";
40
40
  if (debugType) {
41
- node.name = normalizeNodeName(debugType.displayName);
41
+ if (debugType.displayName) {
42
+ node.name = normalizeNodeName(debugType.displayName);
43
+ }
42
44
  if (typeof debugType.render === 'function') {
43
45
  node.type = "function";
44
46
  }
45
47
  }
46
48
  } else if (typeof fiber.type === "function") {
47
- node.name = normalizeNodeName(fiber.type.name);
49
+ if (fiber.type.name) {
50
+ node.name = normalizeNodeName(fiber.type.name);
51
+ } else {
52
+ node.name = "anonymous";
53
+ }
48
54
  node.kind = "function";
49
55
 
50
56
  node.props = getProps(fiber);