fix:处理边界问题

This commit is contained in:
黄云飞
2021-11-22 19:49:05 +08:00
parent 54c44a0443
commit 45c98fc1c5
4 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ export default class Editor {
canvas.height = parseInt(canvas.style.height) * dpr
canvas.style.cursor = 'text'
ctx.scale(dpr, dpr)
if (elementList[0].value !== ZERO) {
if (elementList[0]?.value !== ZERO) {
elementList.unshift({
value: ZERO
})