undefined
from function call171 liveSettingsPaths.forEach(path => {
172 if (!SettingSchema.path(path) && !path.startsWith('_')) {
173 needUpdate = true;
174 _.set(liveSettings, path, undefined);175 }
176 });
177
When an argument is omitted from a function call, it will default to undefined
.
It is therefore redundant to explicitly pass an undefined
literal as the last argument.
function hasOptionalParam(a: number, b?: number) {
// ...
}
hasOptionalParam(1, undefined)
function hasOptionalParam(a: number, b?: number) {
// ...
}
hasOptionalParam(1)
hasOptionalParam(1, 2)