mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00:00
Make _array & _keyArray non-enumerable (#1075)
Because Map has no enumerable properties
This commit is contained in:
parent
fde3a976aa
commit
b68283e57a
1 changed files with 4 additions and 2 deletions
|
|
@ -9,17 +9,19 @@ class Collection extends Map {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cached array for the `array()` method - will be reset to `null` whenever `set()` or `delete()` are called.
|
* Cached array for the `array()` method - will be reset to `null` whenever `set()` or `delete()` are called.
|
||||||
|
* @name Collection#_array
|
||||||
* @type {?Array}
|
* @type {?Array}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this._array = null;
|
Object.defineProperty(this, '_array', { value: null, writable: true, configurable: true });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cached array for the `keyArray()` method - will be reset to `null` whenever `set()` or `delete()` are called.
|
* Cached array for the `keyArray()` method - will be reset to `null` whenever `set()` or `delete()` are called.
|
||||||
|
* @name Collection#_keyArray
|
||||||
* @type {?Array}
|
* @type {?Array}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this._keyArray = null;
|
Object.defineProperty(this, '_keyArray', { value: null, writable: true, configurable: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
set(key, val) {
|
set(key, val) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue