Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

fix: Remove deepClone on SettingsFolder#get #841

Merged
merged 1 commit into from
Oct 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/settings/SettingsFolder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { isObject, objectToTuples, arraysStrictEquals, toTitleCase, mergeObjects, makeObject, resolveGuild, deepClone } = require('../util/util');
const { isObject, objectToTuples, arraysStrictEquals, toTitleCase, mergeObjects, makeObject, resolveGuild } = require('../util/util');
const Type = require('../util/Type');

/**
Expand Down Expand Up @@ -81,7 +81,7 @@ class SettingsFolder extends Map {
*/
get(path) {
// Map.prototype.get.call was used to avoid infinite recursion
return deepClone(path.split('.').reduce((folder, key) => Map.prototype.get.call(folder, key), this));
return path.split('.').reduce((folder, key) => Map.prototype.get.call(folder, key), this);
}

/**
Expand Down