Skip to content

Commit

Permalink
fix: delta comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofandel committed Jan 31, 2023
1 parent 545cfa4 commit f402ebb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions demo/src/examples/BasicExample.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@ export default defineComponent({
},
setup: () => {
const content = ref<Delta>(
new Delta([
{ insert: 'Gandalf', attributes: { bold: true } },
{ insert: ' the ' },
{ insert: 'Grey', attributes: { color: '#ccc' } },
])
new Delta()
)
return { content }
},
})
</script>

2 changes: 1 addition & 1 deletion packages/vue-quill/src/components/QuillEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export const QuillEditor = defineComponent({
}

const deltaHasValuesOtherThanRetain = (delta: Delta): boolean => {
return Object.values(delta).some((v) => !v.retain)
return Object.values(delta.ops).some((v) => !v.retain)
}

// eslint-disable-next-line vue/no-setup-props-destructure
Expand Down

0 comments on commit f402ebb

Please sign in to comment.