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

@@ -51,7 +51,7 @@ export const pasteElementsMethod = function (type, x, y) {
* @returns {void}
*/
function checkIDs (elem) {
if (elem.attr && elem.attr.id) {
if (elem.attr?.id) {
changedIDs[elem.attr.id] = svgCanvas.getNextId()
elem.attr.id = changedIDs[elem.attr.id]
}