refactor: make use of destructuring for Constants (#1942)

This commit is contained in:
SpaceEEC
2017-09-16 20:31:36 +02:00
committed by Crawl
parent 25ece1882b
commit ec4c98704f
66 changed files with 262 additions and 262 deletions

View File

@@ -1,4 +1,4 @@
const Constants = require('../util/Constants');
const { UserSettingsMap } = require('../util/Constants');
const Util = require('../util/Util');
const { Error } = require('../errors');
@@ -17,7 +17,7 @@ class ClientUserSettings {
* @private
*/
patch(data) {
for (const [key, value] of Object.entries(Constants.UserSettingsMap)) {
for (const [key, value] of Object.entries(UserSettingsMap)) {
if (!data.hasOwnProperty(key)) continue;
if (typeof value === 'function') {
this[value.name] = value(data[key]);