Webpack build for branch 11.3-dev: b7851bad37

This commit is contained in:
Travis CI 2018-02-21 21:16:35 +00:00
parent 4e14204afa
commit b9abaa975e
2 changed files with 9 additions and 7 deletions

View file

@ -964,22 +964,24 @@ class Collection extends Map {
/** /**
* Creates an ordered array of the values of this collection, and caches it internally. The array will only be * Creates an ordered array of the values of this collection, and caches it internally. The array will only be
* reconstructed if an item is added to or removed from the collection, or if you change the length of the array * reconstructed if an item is added to or removed from the collection, or if you change the length of the array
* itself. If you don't want this caching behaviour, use `Array.from(collection.values())` instead. * itself. If you don't want this caching behaviour, use `[...collection.values()]` or
* `Array.from(collection.values())` instead.
* @returns {Array} * @returns {Array}
*/ */
array() { array() {
if (!this._array || this._array.length !== this.size) this._array = Array.from(this.values()); if (!this._array || this._array.length !== this.size) this._array = [...this.values()];
return this._array; return this._array;
} }
/** /**
* Creates an ordered array of the keys of this collection, and caches it internally. The array will only be * Creates an ordered array of the keys of this collection, and caches it internally. The array will only be
* reconstructed if an item is added to or removed from the collection, or if you change the length of the array * reconstructed if an item is added to or removed from the collection, or if you change the length of the array
* itself. If you don't want this caching behaviour, use `Array.from(collection.keys())` instead. * itself. If you don't want this caching behaviour, use `[...collection.keys()]` or
* `Array.from(collection.keys())` instead.
* @returns {Array} * @returns {Array}
*/ */
keyArray() { keyArray() {
if (!this._keyArray || this._keyArray.length !== this.size) this._keyArray = Array.from(this.keys()); if (!this._keyArray || this._keyArray.length !== this.size) this._keyArray = [...this.keys()];
return this._keyArray; return this._keyArray;
} }
@ -1344,7 +1346,7 @@ class Collection extends Map {
* @returns {Collection} * @returns {Collection}
*/ */
sort(compareFunction = (x, y) => +(x > y) || +(x === y) - 1) { sort(compareFunction = (x, y) => +(x > y) || +(x === y) - 1) {
return new Collection(Array.from(this.entries()).sort((a, b) => compareFunction(a[1], b[1], a[0], b[0]))); return new Collection([...this.entries()].sort((a, b) => compareFunction(a[1], b[1], a[0], b[0])));
} }
} }
@ -19024,7 +19026,7 @@ class ReadyHandler extends AbstractHandler {
client.readyAt = new Date(); client.readyAt = new Date();
client.users.set(clientUser.id, clientUser); client.users.set(clientUser.id, clientUser);
for (const guild of data.guilds) client.dataManager.newGuild(guild); for (const guild of data.guilds) if (!client.guilds.has(guild.id)) client.dataManager.newGuild(guild);
for (const privateDM of data.private_channels) client.dataManager.newChannel(privateDM); for (const privateDM of data.private_channels) client.dataManager.newChannel(privateDM);
for (const relation of data.relationships) { for (const relation of data.relationships) {

File diff suppressed because one or more lines are too long