Skip to content

Darkroom sometimes returning the wrong number of crops #25

@benjaminparnell

Description

@benjaminparnell

Darkroom is sometimes return the wrong number of crops, even when they have been successfully modified. I ran into this on the Times+ CMS, when I was trying to fix PT 1987 and implement a way to send only the modified crop to darkroom instead of all of them.

      if (_.size(crops) !== numberOfCropsActual) {
        console.log('crops length:', _.size(crops))
        console.log(this.get('crops'), numberOfCropsActual)
        this.trigger('cropsFailed')
      }

http://git.io/RtTseQ

Sometimes Darkroom is returning the correct amount of crops, and sometimes it is not, which triggers the cropsFailed event. However, the crops are still persisted in the model, and still save properly when you save an article.

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