CIDARLAB / 3DuF

Bad collection size comparison JS-W1031
Anti-pattern
Minor
15 days ago2 years old
Prefer > for comparing collection sizes with 0. >= 0 always evaluates to true
 57        const cleanparamdata = this._params.toMap();
 58        if ((mint !== "" && mint !== "TEXT") || mint === null) {
 59            const ports = ComponentAPI.getComponentPorts(cleanparamdata, mint);
 60            if (ports != undefined && ports.length >= 0 && ports !== null) { 61                for (const port of ports) {
 62                    this.setPort(port.label, port);
 63                }