       url: 'https://example.com/'
     @props.project.update changes
 
-  handleRemoveLink: (linkKey) ->
-    changes = {}
-    changes['urls'] = @props.project.urls.filter((link) -> link._key != linkKey)
-    @props.project.update changes
+  handleRemoveLink: (linkToRemove) ->
+    changes =
+      urls: (link for link in @props.project.urls when link isnt linkToRemove)
+    @props.project.update(changes).save()
 
 module.exports = React.createClass
   displayName: 'EditProjectDetails'

            <small className="form-help">Adding an external link will make it appear as a new tab alongside the science, classify, and discuss tabs.</small>
            <ExternalLinksEditor project={@props.project} />
          </div>
        </div>

        <hr />

        <div>
          Data export<br />
          <button type="button" disabled={@state.exportRequested} onClick={@requestDataExport}>Request new data export</button>{' '}
          <small className="form-help">

          {for link, i in @props.project.urls
            link._key ?= Math.random()
            <tr key={link._key}>
              <td>
                <ResourceInput resource={@props.project} update="urls.#{i}.label" />
              </td>
              <td>
                <ResourceInput resource={@props.project} update="urls.#{i}.url" />
              </td>
              <td>
                <button type="button" onClick={@handleRemoveLink.bind this, link}>
                  <i className="fa fa-remove"></i>
                </button>
              </td>
            </tr>}
        </tbody>
      </table>
