[BUG]: SocialShareButton logs unconditional console.warn when script is not loaded

Đang mở Phù hợp với người mới
#461 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@vivekrajputofficial29-afk đang làm issue này rồi.

Từ ngày 19/11/2026.

  • #470 của @vivekrajputofficial29-afk — đang mở

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
89/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, react

Hướng nghiên cứu

Bắt đầu với useEffect trong src/components/SocialShareButton.jsx, khoảng dòng 57–59, và kiểm tra cách prop debug hiện có được sử dụng. Thêm điều kiện cho cảnh báo hoặc xóa cảnh báo như mô tả, sau đó xác minh rằng cảnh báo bị ẩn khi debug là false và hiển thị khi giá trị này là true. Hoàn tất khi thao tác điều hướng thông thường không còn ghi cảnh báo vào nhật ký.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug enhancement
Bug Description
Bug Description

In src/components/SocialShareButton.jsx, an else branch in useEffect logs console.warn('SocialShareButton widget not loaded') on every render where window.SocialShareButton is undefined.

Since the component already accepts a debug prop (defaulting to false), this warning clutters developer and browser console logs during normal runtime and testing environments.

Steps to Reproduce
  1. Open OrgExplorer with browser DevTools / Console open.
  2. Navigate across pages (such as /overview).
  3. Notice SocialShareButton widget not loaded warning in the console.
Location
  • File: src/components/SocialShareButton.jsx
  • Line: 57–59
Proposed Solution

Gate the warning behind the existing debug prop, or remove it so it does not log in normal production/development runs:

} else if (debug) {
  console.warn('SocialShareButton widget not loaded');
}
Impact

Low - Minor inconvenience / Dev ergonomics

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Steps to Reproduce

No response

Logs and Screenshots

No response

Environment Details

No response

Impact

Critical - Application is unusable

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Ngôn ngữ chính
JavaScript
Star
53
Fork
182
Merge trung bình
18 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của AOSSIE-Org/OrgExplorer

Tất cả issue của AOSSIE-Org/OrgExplorer

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.