Skip to content

Commit 6e83d66

Browse files
committed
docs(fix): DiffEditor unmounting console error in website
1 parent 6970536 commit 6e83d66

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

website/blog/2025-01-XX-v0.15-vue-support-collection-remove.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ app.mount('#app');
5656

5757
All the familiar hooks are available as Vue composables:
5858

59-
```vue title="ArticleDetail.vue"
59+
```html title="ArticleDetail.vue"
6060
<script setup lang="ts">
6161
import { useSuspense } from '@data-client/vue';
6262
import { ArticleResource } from './resources';

website/src/components/DiffEditorMonaco.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ export default function DiffEditor({
5454
height={height}
5555
theme="prism"
5656
loading={fallback}
57+
// Prevent "TextModel got disposed before DiffEditorWidget model got reset" error
58+
// by not letting @monaco-editor/react manage model disposal
59+
keepCurrentOriginalModel
60+
keepCurrentModifiedModel
5761
/>
5862
</div>
5963
</div>

0 commit comments

Comments
 (0)