Commit 1d152b6e authored by Sakthipriyan Vairamani (thefourtheye)'s avatar Sakthipriyan Vairamani (thefourtheye) Committed by Refael Ackermann
Browse files

tools: prefer filter to remove empty strings

Ref: https://github.com/nodejs/node/pull/23585#issuecomment-430585490

Python's `list.remove` will throw if the element is not found and also
it removes only the first occurrence.

This patch replaces the use of `list.remove` with a `filter` which
solves both of the above mentioned problems.

PR-URL: https://github.com/nodejs/node/pull/23727


Reviewed-By: default avatarRichard Lau <riclau@uk.ibm.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarRod Vagg <rod@vagg.org>
Reviewed-By: default avatarRefael Ackermann <refack@gmail.com>
Reviewed-By: default avatarMatheus Marchini <mat@mmarchini.me>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 9c82a1e7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment