fix(sweepers): provide default for object param (#7182)

This commit is contained in:
ckohen
2022-01-07 14:16:00 -08:00
committed by GitHub
parent 37587e2bcb
commit ae2f013653

View File

@@ -375,11 +375,11 @@ class Sweepers {
* Sweep a direct sub property of all guilds * Sweep a direct sub property of all guilds
* @param {string} key The name of the property * @param {string} key The name of the property
* @param {Function} filter Filter function passed to sweep * @param {Function} filter Filter function passed to sweep
* @param {SweepEventOptions} [eventOptions] Options for the Client event emitted here * @param {SweepEventOptions} [eventOptions={}] Options for the Client event emitted here
* @returns {Object} Object containing the number of guilds swept and the number of items swept * @returns {Object} Object containing the number of guilds swept and the number of items swept
* @private * @private
*/ */
_sweepGuildDirectProp(key, filter, { emit = true, outputName }) { _sweepGuildDirectProp(key, filter, { emit = true, outputName } = {}) {
if (typeof filter !== 'function') { if (typeof filter !== 'function') {
throw new TypeError('INVALID_TYPE', 'filter', 'function'); throw new TypeError('INVALID_TYPE', 'filter', 'function');
} }