Redocly / Redocly/redoc

Cannot set properties of undefined (setting 'triple-quoted-string') TypeError: Cannot set properties of undefined

Open
#2,511 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

Describe the bug
The latest version introduced a regression bug with prism. The 2.1.2 doesn't have this issue

Additional context
Cannot set properties of undefined (setting 'triple-quoted-string') TypeError: Cannot set properties of undefined (setting 'triple-quoted-string') at Object.extend (webpack-internal:///./node_modules/prismjs/prism.js:345:16) at eval (webpack-internal:///./node_modules/prismjs/components/prism-scala.js:1:41) at ./node_modules/prismjs/components/prism-scala.js ([https://localhost:3000/vendors-node_modules_mui_icons-material_Add_js-node_modules_mui_icons-material_Done_js-node_m-72c075.bundle.js:2299:1](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)) at webpack_require ([https://localhost:3000/main.bundle.js:5618:33](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)) at fn ([https://localhost:3000/main.bundle.js:5911:21](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)) at eval (webpack-internal:///./node_modules/redoc/bundles/redoc.browser.lib.js:41:13084) at eval (webpack-internal:///./node_modules/redoc/bundles/redoc.browser.lib.js:1819:3806) at eval (webpack-internal:///./node_modules/redoc/bundles/redoc.browser.lib.js:1819:3811) at eval (webpack-internal:///./node_modules/redoc/bundles/redoc.browser.lib.js:2:37) at eval (webpack-internal:///./node_modules/redoc/bundles/redoc.browser.lib.js:2:43)

The error is introduced in https://github.com/Redocly/redoc/releases/tag/v2.1.3 intentionally in https://github.com/Redocly/redoc/commit/4fc6aa0859c94e25fd30c4a4250455e44cc76488

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare Redoc v2.1.2 with v2.1.3 and inspect commit 4fc6aa0859c94e25fd30c4a4250455e44cc76488, focusing on Prism's prism.js and prism-scala.js loading shown in the stack trace. Reproduce the failure with Scala syntax highlighting and confirm that the TypeError about triple-quoted-string no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.