When a component has no "#purl" (e.g. no version is set), the following line raises an exception:
|
if (this.#purl || other.#purl) { return this.#purl.localeCompare(other.#purl) } |
I'd suggest using && rather than || to fallback to other properties of the module for comparison, if one or the other component has no purl.
When a component has no "#purl" (e.g. no version is set), the following line raises an exception:
cyclonedx-node-module/model/Component.js
Line 522 in 7ea9cb5
I'd suggest using
&&rather than||to fallback to other properties of the module for comparison, if one or the other component has no purl.