screenright-client 0.9.3 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -86,16 +86,16 @@ export const capture = (page, key, title, parentKey) => __awaiter(void 0, void 0
86
86
  key,
87
87
  title,
88
88
  url: page.url(),
89
- childrens: [],
89
+ children: [],
90
90
  };
91
91
  if (parentKey) {
92
92
  const searchParent = (attributes) => {
93
93
  for (let i = 0; i < attributes.length; i++) {
94
94
  if (attributes[i].key === parentKey) {
95
- attributes[i].childrens.push(attribute);
95
+ attributes[i].children.push(attribute);
96
96
  break;
97
97
  }
98
- searchParent(attributes[i].childrens);
98
+ searchParent(attributes[i].children);
99
99
  }
100
100
  };
101
101
  searchParent(result.screenshotItemAttributes);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screenright-client",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "description": "screenright's nodejs client library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -8,7 +8,7 @@ type ScreenshotItemAttribute = {
8
8
  key: string
9
9
  title: string
10
10
  url: string
11
- childrens: ScreenshotItemAttribute[]
11
+ children: ScreenshotItemAttribute[]
12
12
  }
13
13
 
14
14
  type Result = {
@@ -111,18 +111,18 @@ export const capture = async (
111
111
  key,
112
112
  title,
113
113
  url: page.url(),
114
- childrens: [],
114
+ children: [],
115
115
  }
116
116
 
117
117
  if (parentKey) {
118
118
  const searchParent = (attributes: ScreenshotItemAttribute[]) => {
119
119
  for (let i = 0; i < attributes.length; i++) {
120
120
  if (attributes[i].key === parentKey) {
121
- attributes[i].childrens.push(attribute)
121
+ attributes[i].children.push(attribute)
122
122
  break
123
123
  }
124
124
 
125
- searchParent(attributes[i].childrens)
125
+ searchParent(attributes[i].children)
126
126
  }
127
127
  }
128
128