Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'length' of undefined #2392

Closed
oldrich-svec opened this issue Mar 17, 2021 · 0 comments · Fixed by microsoft/monaco-typescript#76
Closed

TypeError: Cannot read property 'length' of undefined #2392

oldrich-svec opened this issue Mar 17, 2021 · 0 comments · Fixed by microsoft/monaco-typescript#76
Labels
bug Issue identified by VS Code Team member as probable bug typescript
Milestone

Comments

@oldrich-svec
Copy link

monaco-editor version: 0.23.0
Browser: Google Chrome Version 87.0.4280.88 (Official Build) (64-bit)
OS: Windows 10
Playground code that reproduces the issue:

Navigate to:

https://microsoft.github.io/monaco-editor/playground.html

Paste:

const origText = `
/// <reference path="./x.d.ts" />

// @ts-ignore
const x
`
var originalModel = monaco.editor.createModel(origText, "typescript");
var modifiedModel = monaco.editor.createModel(``, "typescript");

var diffEditor = monaco.editor.createDiffEditor(document.getElementById("container"));

diffEditor.setModel({
	original: originalModel,
	modified: modifiedModel
});

gives

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants