Skip to content

Commit

Permalink
set LogAllow when console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmatthewnguyen105 committed Dec 14, 2023
1 parent eb46131 commit e514473
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/_node/node/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ const ungroup = ({
});
addedChildCount[parentNode.uid] += containerNode.children.length - 1;
});
console.log(needToSelectNodePaths);
return needToSelectNodePaths;
})();
return needToSelectNodePaths;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
deleteFileOrFolder,
moveActions,
} from "../helpers";
import { LogAllow } from "@_constants/global";

interface IUseFileOperations {
invalidNodes: {
Expand Down Expand Up @@ -273,7 +274,7 @@ export const useFileOperations = ({
true,
);
} catch (err) {
console.log(err);
LogAllow && console.log(err);
}
} else if (project.context === "idb") {
await moveIDBFF(nodeData, targetNodeData, nodeData.name, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {
validateAndMoveNode,
} from "../helpers";
import { callFileApi } from "@_node/apis";
import { LogAllow } from "@_constants/global";

interface IUseNodeActionsHandler {
invalidNodes: {
Expand Down Expand Up @@ -320,12 +321,13 @@ export const useNodeActionsHandler = ({
uids,
},
() => {
console.error("error while removing file system");
LogAllow && console.error("error while removing file system");
},
(allDone: boolean) => {
console.log(
allDone ? "all is successfully removed" : "some is not removed",
);
LogAllow &&
console.log(
allDone ? "all is successfully removed" : "some is not removed",
);
},
);
removeInvalidNodes(...uids);
Expand Down

0 comments on commit e514473

Please sign in to comment.