* for #675 * fix linting errors
This commit is contained in:
parent
eebe9d9252
commit
244af16b64
1 changed files with 5 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue