updateAuthor (authorId, data) {
    // prune empty middlenames
    data.middleNames = data.middleNames.filter(Boolean)
    this.api.getEditorSession().transaction(tx => {
      documentHelpers.updateProperty(tx, [authorId, 'firstName'], data.firstName)
      documentHelpers.updateProperty(tx, [authorId, 'middleNames'], data.middleNames)
      documentHelpers.updateProperty(tx, [authorId, 'lastName'], data.lastName)
      documentHelpers.updateProperty(tx, [authorId, 'prefix'], data.prefix)
      documentHelpers.updateProperty(tx, [authorId, 'suffix'], data.suffix)
      documentHelpers.updateProperty(tx, [authorId, 'affiliations'], data.affiliations.map(a => a.id))
      this.api._selectItem(tx, tx.get(authorId))
    })
  }
@param {string} authorId
@param {object} data from AuthorModal state