* Returns the greatest submission timestamp across the given responses, or * undefined when the list is empty.
(responses: FormResponse[])
| 329 | * undefined when the list is empty. |
| 330 | */ |
| 331 | function latestResponseTime(responses: FormResponse[]): string | undefined { |
| 332 | let latest = '' |
| 333 | for (const r of responses) { |
| 334 | const t = r.lastSubmittedTime || r.createTime || '' |
| 335 | if (t > latest) latest = t |
| 336 | } |
| 337 | return latest || undefined |
| 338 | } |
| 339 | |
| 340 | /** |
| 341 | * Builds the content hash for a form. The hash must change when either the form |
no outgoing calls
no test coverage detected