AppFlowy-IO / AppFlowy-IO/AppFlowy-Web
[Bug] Refactor this function to not always return the same value.
- Ngôn ngữ chính
- TypeScript
- Star
- 326
- Fork
- 167
- Merge trung bình
- 17 giờ 6 phút
- Pull request đã merge (30 ngày)
- 72
Mô tả
### Bug Description
The intention of this function is not clear. Take a look.
``` JavaScript
const shouldShowForCurrentView = useCallback(() => {
if (!currentView) return true;
// Show for all views
return true;
}, [currentView]);
```
Did you mean false in the `if` statement?
### Steps to Reproduce
Take a look at the function and tell if there is any logic in it. What was the original intent?
### Expected Behavior
Should return different values or this is not needed at all.
### Browser and Version
Edge latest
### AppFlowy Version(s)
0.15
### Screenshots
_No response_
### Logs and Console Output
_No response_
### Additional Context
_No response_
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.