Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

404 B
Raw Blame
export function reconcileSocialDraftAfterSave(
  currentDraft: string[],
  draftAtSubmission: readonly string[],
  savedLinks: readonly string[],
): string[] {
  if (
    currentDraft.length !== draftAtSubmission.length ||
    currentDraft.some((link, index) => link !== draftAtSubmission[index])
  ) {
    return currentDraft
  }

  return draftAtSubmission.map((_, index) => savedLinks[index] ?? '')
}