()
| 317 | handleRemove = (index: number) => () => this.remove<any>(index); |
| 318 | |
| 319 | pop<T>(): T { |
| 320 | // Remove relevant pieces of `touched` and `errors` too! |
| 321 | let result: any; |
| 322 | this.updateArrayField( |
| 323 | // so this gets call 3 times |
| 324 | (array: any[]) => { |
| 325 | const tmp = array.slice(); |
| 326 | if (!result) { |
| 327 | result = tmp && tmp.pop && tmp.pop(); |
| 328 | } |
| 329 | return tmp; |
| 330 | }, |
| 331 | true, |
| 332 | true |
| 333 | ); |
| 334 | |
| 335 | return result as T; |
| 336 | } |
| 337 | |
| 338 | handlePop = () => () => this.pop<any>(); |
| 339 |