From 244af16b64cfa37f1fac0f54750e9a7c314269a3 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Thu, 13 Dec 2018 17:06:34 -0500 Subject: [PATCH] For #675, needs more testing to know if it fixes it! (#784) * for #675 * fix linting errors --- client/modules/IDE/actions/project.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/modules/IDE/actions/project.js b/client/modules/IDE/actions/project.js index 91052d8d..9880754b 100644 --- a/client/modules/IDE/actions/project.js +++ b/client/modules/IDE/actions/project.js @@ -2,7 +2,7 @@ import { browserHistory } from 'react-router'; import axios from 'axios'; import objectID from 'bson-objectid'; import each from 'async/each'; -import { isEqual } from 'lodash'; +import { isEqual, pick } from 'lodash'; import * as ActionTypes from '../../../constants'; import { showToast, setToastText } from './toast'; import { setUnsavedChanges, @@ -77,7 +77,10 @@ export function saveProject(autosave = false) { .then((response) => { const currentState = getState(); const savedProject = Object.assign({}, response.data); - if (!isEqual(currentState.files, response.data.files)) { + if (!isEqual( + pick(currentState.files, ['name', 'children', 'content']), + pick(response.data.files, ['name', 'children', 'content']) + )) { savedProject.files = currentState.files; dispatch(setUnsavedChanges(true)); } else {