Skip to content

Can't upload photo - javascript error #9

Description

@bradparks

Hey! I can login and create tags, albums, photos, etc, and it seems to work great.

But when I try and save a photo, clicking on the "Save" button seems to fail silently.

Looking in the console, I see the following:


photo-update.tsx:47 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toString')
    at photo-update.tsx:47:1
    at Array.find (<anonymous>)
    at saveEntity (photo-update.tsx:47:1)
    at index.cjs.js:1:1

which leads me to the const entity line below:

  const saveEntity = values => {
    values.taken = convertDateTimeToServer(values.taken);
    values.uploaded = convertDateTimeToServer(values.uploaded);

    const entity = {
      ...photoEntity,
      ...values,
      tags: mapIdList(values.tags),
      album: albums.find(it => it.id.toString() === values.album.toString()),
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions