(path1: string, path2: string)
| 191 | * @private |
| 192 | */ |
| 193 | export function concatenatePaths(path1: string, path2: string): string { |
| 194 | if (path1.length === 0) return path2 |
| 195 | if (path2.length === 0) return path1 |
| 196 | |
| 197 | if (path2.startsWith('[')) { |
| 198 | return path1 + path2 |
| 199 | } |
| 200 | |
| 201 | // In cases where parent and child withFieldGroup forms are both nested |
| 202 | if (path2.startsWith('.')) { |
| 203 | return path1 + path2 |
| 204 | } |
| 205 | |
| 206 | return `${path1}.${path2}` |
| 207 | } |
| 208 | |
| 209 | /** |
| 210 | * @private |
no outgoing calls
no test coverage detected