From 1d7aaa99810ff5e8260d13c6136f692066f3fc6d Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Mon, 24 Oct 2016 16:42:15 -0400 Subject: [PATCH] set unsaved changes when file is uploaded --- client/modules/IDE/actions/files.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/modules/IDE/actions/files.js b/client/modules/IDE/actions/files.js index 43c03e79..1108a2b6 100644 --- a/client/modules/IDE/actions/files.js +++ b/client/modules/IDE/actions/files.js @@ -2,6 +2,7 @@ import * as ActionTypes from '../../../constants'; import axios from 'axios'; import objectID from 'bson-objectid'; import blobUtil from 'blob-util'; +import { setUnsavedChanges } from './ide'; const ROOT_URL = location.href.indexOf('localhost') > 0 ? 'http://localhost:8000/api' : '/api'; @@ -63,6 +64,7 @@ export function createFile(formProps) { dispatch({ type: ActionTypes.HIDE_MODAL }); + dispatch(setUnsavedChanges(true)); }) .catch(response => dispatch({ type: ActionTypes.ERROR, @@ -83,6 +85,7 @@ export function createFile(formProps) { dispatch({ type: ActionTypes.HIDE_MODAL }); + dispatch(setUnsavedChanges(true)); } }; }