Skip to content

fix: Error when viewing text component in RAW HTML - #1869

Merged
rayzhou-bit merged 1 commit into
masterfrom
faraz/fix-error_when_viewing_text_component_in_raw_html
Apr 28, 2025
Merged

fix: Error when viewing text component in RAW HTML#1869
rayzhou-bit merged 1 commit into
masterfrom
faraz/fix-error_when_viewing_text_component_in_raw_html

Conversation

@Faraz32123

Copy link
Copy Markdown
Contributor

Ticket: TNL-11959

  • This PR fixes the error when viewing text component in RAW HTML as lang was passed undefined and CODEMIRROR_LANGUAGES[lang]() was throwing this: TypeError: Ap[i] is not a function

Before:

before

After:

after

@Faraz32123 Faraz32123 self-assigned this Apr 28, 2025
@codecov

codecov Bot commented Apr 28, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.78%. Comparing base (dbb1a99) to head (f382ace).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #1869    +/-   ##
========================================
  Coverage   93.77%   93.78%            
========================================
  Files        1146     1146            
  Lines       23898    23898            
  Branches     5040     5145   +105     
========================================
+ Hits        22411    22412     +1     
+ Misses       1419     1409    -10     
- Partials       68       77     +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/editors/sharedComponents/CodeEditor/hooks.js Outdated
This commit fixes the error when viewing text component in RAW HTML as `lang` was passed `undefined` and `CODEMIRROR_LANGUAGES[lang]()` was throwing this: `TypeError: Ap[i] is not a function`
@Faraz32123
Faraz32123 force-pushed the faraz/fix-error_when_viewing_text_component_in_raw_html branch from 08e6e7d to f382ace Compare April 28, 2025 16:51
@Faraz32123
Faraz32123 requested a review from rayzhou-bit April 28, 2025 16:51
@rayzhou-bit
rayzhou-bit merged commit 65aca04 into master Apr 28, 2025
@rayzhou-bit
rayzhou-bit deleted the faraz/fix-error_when_viewing_text_component_in_raw_html branch April 28, 2025 20:51
@bradenmacdonald

Copy link
Copy Markdown
Contributor

FYI @Anas12091101. No action needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants