es6 improvements

This commit is contained in:
JFH
2022-01-05 10:44:47 -03:00
parent 6bdfcaee1b
commit bfe96cfcef
23 changed files with 55 additions and 113 deletions

View File

@@ -426,7 +426,7 @@ export const textActionsMethod = (function () {
svgCanvas.call('selected', [curtext])
svgCanvas.addToSelection([curtext], true)
}
if (curtext && !curtext.textContent.length) {
if (!curtext?.textContent.length) {
// No content, so delete
svgCanvas.deleteSelectedElements()
}