Skip to content

Commit f151650

Browse files
committed
cleanup comments
1 parent 0b67500 commit f151650

File tree

1 file changed

+0
-10
lines changed
  • apps/sim/executor/variables/resolvers

1 file changed

+0
-10
lines changed

apps/sim/executor/variables/resolvers/block.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,33 +65,25 @@ function isPathInOutputSchema(
6565
continue
6666
}
6767

68-
// Handle array index access (e.g., [0])
6968
if (/^\d+$/.test(part)) {
70-
// If current is file[] type, next part should be a file property
7169
if (isFileArrayType(current)) {
72-
// Check if next part is a valid file property
7370
if (i + 1 < pathParts.length) {
7471
const nextPart = pathParts[i + 1]
7572
return USER_FILE_ACCESSIBLE_PROPERTIES.includes(nextPart as any)
7673
}
77-
// If no next part, array index access is valid
7874
return true
7975
}
80-
// For other array types, continue to next iteration
8176
continue
8277
}
8378

8479
if (current === null || current === undefined) {
8580
return false
8681
}
8782

88-
// Check if part exists in current
8983
if (part in current) {
9084
const nextCurrent = current[part]
91-
// If next field is file[] type and we have more parts, check if next part is numeric
9285
if (nextCurrent?.type === 'file[]' && i + 1 < pathParts.length) {
9386
const nextPart = pathParts[i + 1]
94-
// If next part is numeric (array index), allow it and check the part after
9587
if (/^\d+$/.test(nextPart) && i + 2 < pathParts.length) {
9688
const propertyPart = pathParts[i + 2]
9789
return USER_FILE_ACCESSIBLE_PROPERTIES.includes(propertyPart as any)
@@ -117,9 +109,7 @@ function isPathInOutputSchema(
117109
}
118110
}
119111

120-
// Handle file[] type - allow access to file properties after array index
121112
if (isFileArrayType(current) && USER_FILE_ACCESSIBLE_PROPERTIES.includes(part as any)) {
122-
// Valid file property access
123113
return true
124114
}
125115

0 commit comments

Comments
 (0)