8000 fix formatter bug · supercoderhawk/emr-processor@e97c1c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit e97c1c3

Browse files
fix formatter bug
1 parent f5cdbd0 commit e97c1c3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/src/renderer/utils/formatter.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ class JSONFormatter {
55

66
JSONFormatter.install = function (Vue, options) {
77
Vue.directive('json-content', function (el, binding) {
8-
// console.log("display-json", el, binding);
8+
// console.log('display-json', el, binding)
99
let renderer = new JsonFormatter(binding.value)
10+
while (el.hasChildNodes()) {
11+
el.removeChild(el.firstChild)
12+
}
1013
el.appendChild(renderer.render())
1114
if (!document.getElementById('json-formatter-style')) {
1215
let styleTag = document.createElement('style')

0 commit comments

Comments
 (0)
0