From 787f25ddde5111b802774795a3ad1e17544ffd47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Wed, 1 Jul 2015 15:23:50 +0200 Subject: [PATCH] fix old edition data bug --- js/components/edition.js | 1 - js/components/edition_container.js | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/js/components/edition.js b/js/components/edition.js index 1d61258f..2776a865 100644 --- a/js/components/edition.js +++ b/js/components/edition.js @@ -27,7 +27,6 @@ import RequestActionForm from './ascribe_forms/form_request_action'; import EditionActions from '../actions/edition_actions'; import AclButtonList from './ascribe_buttons/acl_button_list'; -import fineUploader from 'fineUploader'; import ReactS3FineUploader from './ascribe_uploader/react_s3_fine_uploader'; import GlobalNotificationModel from '../models/global_notification_model'; diff --git a/js/components/edition_container.js b/js/components/edition_container.js index eaf94864..7475ec28 100644 --- a/js/components/edition_container.js +++ b/js/components/edition_container.js @@ -25,6 +25,12 @@ let EditionContainer = React.createClass({ }, componentWillUnmount() { + // Every time we're leaving the edition detail page, + // just reset the edition that is saved in the edition store + // as it will otherwise display wrong/old data once the user loads + // the edition detail a second time + EditionActions.updateEdition({}); + EditionStore.unlisten(this.onChange); },