resolve syntax errors in script.js breaking project recommendations - #697
resolve syntax errors in script.js breaking project recommendations#697Kazuma-Codes wants to merge 1 commit into
Conversation
|
@Kazuma-Codes is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Kazuma-Codes kindly resolve the conflicts |
|
Thank you for the contribution. After reviewing the PR, I found that the changes overlap with fixes that have already been addressed through other merged pull requests. The branch is also behind the current main branch and contains merge conflicts. Because the affected sections of script.js have since undergone additional updates, merging this PR could reintroduce outdated code and create maintenance issues. For these reasons, I’m closing this PR. Please sync with the latest main branch and check whether the issue still exists before opening a new contribution. Thank you for your effort and interest in improving the project. |
Summary
Fixed critical JavaScript syntax errors in static/script.js that completely broke the project recommendation feature. The fetch API's .catch() error handler contained a duplicated payload variable block instead of proper error handling logic, and was missing closing brackets. Additionally, the renderResults function had a duplicated and incorrectly nested if (!projects || projects.length === 0) conditional block. These two issues caused a SyntaxError: Unexpected end of input at line 933, preventing the browser from executing any client-side JavaScript — making the entire "Find Projects" form non-functional.
Related Issue
Closes #672
Type of Change
data/projects.jsonWhat Was Changed
static/script.jsstatic/script.jsHow to Test This PR
Expected test output:
Test Results
Self-Review Checklist
feat/,fix/,docs/,data/,style/,test/python tests/test_basic.pyand all 27 tests passflake8 .locally and there are no errorsprint()orconsole.log()debug statementsNotes for Reviewer
The root cause was static/script.js as duplicated code blocks broke the .catch() handler and renderResults()