CVEProject / cve-services

This repo contains the source for the CVE Services API.
Creative Commons Zero v1.0 Universal
144 stars 68 forks source link

superfluous if(org) code #1267

Open ElectricNroff opened 3 weeks ago

ElectricNroff commented 3 weeks ago

https://github.com/CVEProject/cve-services/blob/8fc52ad6ce99994ae734bf09952b0aee6baf6a8d/src/controller/org.controller/org.controller.js#L335-L338 https://github.com/CVEProject/cve-services/blob/8fc52ad6ce99994ae734bf09952b0aee6baf6a8d/src/controller/org.controller/org.controller.js#L366 I feel that line 366 makes the code harder to read. The org in if (org) is guaranteed to be truthy.