ignore dates and other meta data when diffing

This commit is contained in:
tophf 2018-02-26 22:56:42 +03:00
parent e42ea2e383
commit ceb11ae52a

View File

@ -547,7 +547,8 @@ function handleUpdate(style, {reason, method, codeIsUpdated} = {}) {
function handleToggledOrCodeOnly() {
const newStyleMeta = getStyleWithNoCode(style);
const diff = objectDiff(oldEntry.styleMeta, newStyleMeta);
const diff = objectDiff(oldEntry.styleMeta, newStyleMeta)
.filter(({key, path}) => path || (!key.startsWith('original') && !key.endsWith('Date')));
if (diff.length === 0) {
// only code was modified
entry = oldEntry;