Skip to content

Commit

Permalink
fix something and upgrade version number
Browse files Browse the repository at this point in the history
  • Loading branch information
alvin-7 committed Jun 27, 2022
1 parent 018d1ba commit 4f5aba4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ contextBridge.exposeInMainWorld('electronAPI', {
for (const item of diffItems) {
Object.assign(diffObj, deepDiff(item[0], item[1]));
}
for (const key in diffObj) {
if (JSON.stringify(diffObj[key]) === '{}') {
delete diffObj[key]
}
}

return {
leftData: leftData,
rightData: rightData,
Expand Down
5 changes: 3 additions & 2 deletions src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const App = () => {
}
}
}
console.error('curline', redux_diffKeys, line)
if (line !== -1) dispatch(redux_setDiffIdx(line));
};
};
Expand Down Expand Up @@ -85,11 +86,11 @@ const App = () => {
</Col>
<Col>
<Button type="primary" onClick={onClickDiffScroll(true)}>
上一个Diff
Pre Diff
</Button>
&nbsp;&nbsp;
<Button type="primary" onClick={onClickDiffScroll(false)}>
下一个Diff
Next Diff
</Button>
</Col>
</Row>
Expand Down
1 change: 0 additions & 1 deletion src/renderer/pages/table/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ const TableDiff = (props: TableProps) => {
} else if (redux_diffIdx >= 0) {
// it set
const curLine = (page - 1) * MAX_PAGE_SIZE;
console.error('curline', curLine)
dispatch(redux_setDiffIdx(curLine));
}
}, [page]);
Expand Down

0 comments on commit 4f5aba4

Please sign in to comment.