Skip to content

Commit

Permalink
Merge pull request #201 from yuque/fix/chrome-extension-bug
Browse files Browse the repository at this point in the history
fix: 修复 useEffect 中依赖错误导致循环问题
  • Loading branch information
moshangqi authored Nov 7, 2023
2 parents 4b3215f + ae22a38 commit 65bc39d
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 65bc39d

Please sign in to comment.