Skip to content

Commit 69bbc18

Browse files
arkhaielcloydlau
andauthored
fix: #98
* apply a breaking change Apply vanilla-jsoneditor v1 breaking change related to the createJSONEditor instead of new JSONEditor * fix: #98 --------- Co-authored-by: Cloyd Lau <31238760+cloydlau@users.noreply.github.com>
1 parent fd41414 commit 69bbc18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { JSONContent, JSONEditorPropsOptional, TextContent } from 'vanilla-
22
import type { App, Plugin, PropType } from 'vue-demi'
33
import { destr, safeDestr } from 'destr'
44
import { debounce } from 'lodash-es'
5-
import { JSONEditor, Mode } from 'vanilla-jsoneditor'
5+
import { createJSONEditor, Mode } from 'vanilla-jsoneditor'
66
import { computed, defineComponent, getCurrentInstance, h, isVue3, onMounted, onUnmounted, ref, unref, watch, watchEffect } from 'vue-demi'
77
import { conclude, resolveConfig } from 'vue-global-config'
88
import { PascalCasedName as name } from '../package.json'
@@ -201,7 +201,7 @@ const JsonEditorVue = defineComponent({
201201
},
202202
)
203203

204-
jsonEditor.value = new JSONEditor({
204+
jsonEditor.value = createJSONEditor({
205205
target: currentInstance?.$refs.jsonEditorRef as Element,
206206
props: initialAttrs,
207207
})

0 commit comments

Comments
 (0)