Skip to content

Commit

Permalink
fix: 修复 useEffect 中依赖错误导致循环问题
Browse files Browse the repository at this point in the history
  • Loading branch information
moshangqi committed Nov 7, 2023
1 parent 4b3215f commit ae22a38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yuque-chrome-extension",
"version": "0.5.0",
"version": "0.5.1",
"description": "语雀浏览器插件",
"private": true,
"releaseNotes": [
Expand Down
7 changes: 2 additions & 5 deletions src/components/SuperSideBar/impl/ClipAssistant/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,11 @@ function ClipContent() {
};

useEffect(() => {
if (
selectSavePosition?.id !== DefaultSavePosition.id ||
!!userTags.length
) {
if (selectSavePosition?.id !== DefaultSavePosition.id) {
return;
}
handleRequestTag();
}, [selectSavePosition, userTags]);
}, [selectSavePosition]);

useEffect(() => {
const onStartSelectArea = () => {
Expand Down

0 comments on commit ae22a38

Please sign in to comment.