mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
undefined check to merge default (#1654)
This commit is contained in:
parent
b1d9084345
commit
e57bfc9313
1 changed files with 1 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ class Util {
|
|||
static mergeDefault(def, given) {
|
||||
if (!given) return def;
|
||||
for (const key in def) {
|
||||
if (!{}.hasOwnProperty.call(given, key)) {
|
||||
if (!{}.hasOwnProperty.call(given, key) && def[key] !== undefined) {
|
||||
given[key] = def[key];
|
||||
} else if (given[key] === Object(given[key])) {
|
||||
given[key] = this.mergeDefault(def[key], given[key]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue