Skip to content

Commit f402ebb

Browse files
committed
fix: delta comparison
1 parent 545cfa4 commit f402ebb

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

Diff for: demo/src/examples/BasicExample.vue

+1-6
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,10 @@ export default defineComponent({
1313
},
1414
setup: () => {
1515
const content = ref<Delta>(
16-
new Delta([
17-
{ insert: 'Gandalf', attributes: { bold: true } },
18-
{ insert: ' the ' },
19-
{ insert: 'Grey', attributes: { color: '#ccc' } },
20-
])
16+
new Delta()
2117
)
2218
2319
return { content }
2420
},
2521
})
2622
</script>
27-

Diff for: packages/vue-quill/src/components/QuillEditor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export const QuillEditor = defineComponent({
186186
}
187187

188188
const deltaHasValuesOtherThanRetain = (delta: Delta): boolean => {
189-
return Object.values(delta).some((v) => !v.retain)
189+
return Object.values(delta.ops).some((v) => !v.retain)
190190
}
191191

192192
// eslint-disable-next-line vue/no-setup-props-destructure

0 commit comments

Comments
 (0)