Skip to content

Commit

Permalink
undo经常亮灯
Browse files Browse the repository at this point in the history
  • Loading branch information
yhn-liu committed Jun 3, 2024
1 parent 1b25422 commit 11df612
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src-ui/components/MultifileCode.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,20 @@ export default function MultifileCode() {
};

const getUndoButtonisDisabled = () => {
// const currentFile = state.files.find(
// file => file.fileName === state.currentFile,
// );
// if (!currentFile) {
// return true;
// }
// return !currentFile.started;
const currentFile = state.files.find(
file => file.fileName === state.currentFile,
file => file.fileName === state.currentFile,
);
if (!currentFile) {
return true;
if (currentFile && currentFile.assembly.length != 0) {
return false;
}
// if (currentFile.paused) {
// return true
// }
return !currentFile.started;
return true;
};

const getResetButtonisDisabled = () => {
Expand Down

0 comments on commit 11df612

Please sign in to comment.