fix lgtm warnings and other minor fixes

This commit is contained in:
JFH
2021-12-30 23:18:43 -03:00
parent 88207acc98
commit ff34764955
17 changed files with 62 additions and 84 deletions

View File

@@ -12,7 +12,7 @@ import {
transformPoint, getMatrix
} from './math.js'
import {
assignAttributes, getRotationAngle, isNullish,
assignAttributes, getRotationAngle,
getElement
} from './utilities.js'
@@ -635,7 +635,7 @@ export class Path {
seg.next.prev = seg
seg.mate = segs[startI]
seg.addGrip()
if (isNullish(this.first_seg)) {
if (!this.first_seg) {
this.first_seg = seg
}
} else if (!nextSeg) {
@@ -907,7 +907,7 @@ export class Path {
*/
selectPt (pt, ctrlNum) {
this.clearSelection()
if (isNullish(pt)) {
if (!pt) {
this.eachSeg(function (i) {
// 'this' is the segment here.
if (this.prev) {