Bug reportSep 4, 2026· 0:26· 11 views
Monaco Editor: createMultiFileDiffEditor returns a hollow object — setModel is not a function
0:26 total
Comments · 0
Be the first to comment.
Bug report— by SceneRecap AI
highdiff-editor
os: macOSbrowser: Chromium 151.0.7922.34version: latest stable (0.55.1)
Repro steps
- 1.Open the Monaco Editor playground
- 2.Initialize a multi-file diff editor using monaco.editor.createMultiFileDiffEditor(container, {})
- 3.Attempt to call editor.setModel() or check prototype methods on the returned editor instance
Expected
createMultiFileDiffEditor returns a complete editor instance exposing expected lifecycle and model methods such as setModel, getModel, getDiffEditors, and dispose.
Actual
createMultiFileDiffEditor returns an object whose prototype only contains constructor, with typeof editor.setModel returning 'undefined', resulting in 'TypeError: editor.setModel is not a function'.
Evidence
visualAPI check displays typeof editor.setModel returning 'undefined' and prototype property list showing only ['constructor']
consoleTypeError: editor.setModel is not a function when invoking setModel on the created editor instance
Issue markdown (copy-paste ready)
### Description
Calling `monaco.editor.createMultiFileDiffEditor(container, {})` returns an incomplete/hollow object instance missing standard multi-file diff editor methods (such as `setModel`, `getModel`, `getDiffEditors`, `dispose`). Calling `editor.setModel(...)` throws a `TypeError`.
### Steps to Reproduce
1. Open Monaco Editor playground (v0.55.1 stable) at 0.0s.
2. Instantiate an editor via `const editor = monaco.editor.createMultiFileDiffEditor(container, {})` at 9.0s.
3. Verify available prototype methods or call `editor.setModel({ modified: [m1], original: [m2] })` at 9.0s.
### Expected Behavior
`createMultiFileDiffEditor` should return an editor instance with standard API methods like `setModel` defined on its prototype.
### Actual Behavior
`typeof editor.setModel` evaluates to `"undefined"`, and calling `editor.setModel(...)` throws `TypeError: editor.setModel is not a function`.
*Recorded with SceneRecap.*Your recordings could explain themselves too.
Free plan · silent recordings welcome · bug reports included.
Try SceneRecap free →