@stoplight/elements 8.4.1 → 8.4.3

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.
package/index.esm.js CHANGED
@@ -23,8 +23,7 @@ function computeTagGroups(serviceNode, nodeType) {
23
23
  const lowerCaseServiceTags = serviceNode.tags.map(tn => tn.toLowerCase());
24
24
  const groupableNodes = serviceNode.children.filter(n => n.type === nodeType);
25
25
  for (const node of groupableNodes) {
26
- const tagName = node.tags[0];
27
- if (tagName) {
26
+ for (const tagName of node.tags) {
28
27
  const tagId = tagName.toLowerCase();
29
28
  if (groupsByTagId[tagId]) {
30
29
  groupsByTagId[tagId].items.push(node);
@@ -38,7 +37,7 @@ function computeTagGroups(serviceNode, nodeType) {
38
37
  };
39
38
  }
40
39
  }
41
- else {
40
+ if (node.tags.length === 0) {
42
41
  ungrouped.push(node);
43
42
  }
44
43
  }
package/index.js CHANGED
@@ -44,8 +44,7 @@ function computeTagGroups(serviceNode, nodeType) {
44
44
  const lowerCaseServiceTags = serviceNode.tags.map(tn => tn.toLowerCase());
45
45
  const groupableNodes = serviceNode.children.filter(n => n.type === nodeType);
46
46
  for (const node of groupableNodes) {
47
- const tagName = node.tags[0];
48
- if (tagName) {
47
+ for (const tagName of node.tags) {
49
48
  const tagId = tagName.toLowerCase();
50
49
  if (groupsByTagId[tagId]) {
51
50
  groupsByTagId[tagId].items.push(node);
@@ -59,7 +58,7 @@ function computeTagGroups(serviceNode, nodeType) {
59
58
  };
60
59
  }
61
60
  }
62
- else {
61
+ if (node.tags.length === 0) {
63
62
  ungrouped.push(node);
64
63
  }
65
64
  }
package/index.mjs CHANGED
@@ -23,8 +23,7 @@ function computeTagGroups(serviceNode, nodeType) {
23
23
  const lowerCaseServiceTags = serviceNode.tags.map(tn => tn.toLowerCase());
24
24
  const groupableNodes = serviceNode.children.filter(n => n.type === nodeType);
25
25
  for (const node of groupableNodes) {
26
- const tagName = node.tags[0];
27
- if (tagName) {
26
+ for (const tagName of node.tags) {
28
27
  const tagId = tagName.toLowerCase();
29
28
  if (groupsByTagId[tagId]) {
30
29
  groupsByTagId[tagId].items.push(node);
@@ -38,7 +37,7 @@ function computeTagGroups(serviceNode, nodeType) {
38
37
  };
39
38
  }
40
39
  }
41
- else {
40
+ if (node.tags.length === 0) {
42
41
  ungrouped.push(node);
43
42
  }
44
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements",
3
- "version": "8.4.1",
3
+ "version": "8.4.3",
4
4
  "description": "UI components for composing beautiful developer documentation.",
5
5
  "keywords": [],
6
6
  "main": "./index.js",
@@ -26,10 +26,10 @@
26
26
  "react-dom": ">=16.8"
27
27
  },
28
28
  "dependencies": {
29
- "@stoplight/elements-core": "~8.4.1",
29
+ "@stoplight/elements-core": "^8.4.3",
30
30
  "@stoplight/http-spec": "^7.1.0",
31
31
  "@stoplight/json": "^3.18.1",
32
- "@stoplight/mosaic": "^1.53.3",
32
+ "@stoplight/mosaic": "^1.53.4",
33
33
  "@stoplight/types": "^14.1.1",
34
34
  "@stoplight/yaml": "^4.3.0",
35
35
  "classnames": "^2.2.6",