From bee50d831c50df68156a774061d2447fc584fe7b Mon Sep 17 00:00:00 2001 From: taichi221228 Date: Thu, 2 May 2024 15:37:11 +0900 Subject: [PATCH] Remove deepMerge function from emoji_utils The deepMerge function was removed from the emoji_utils file. This function was not used in the code and was deemed unnecessary, hence it was removed. Also, with its removal, the corresponding import was deleted. --- .../mastodon/features/emoji/emoji_utils.ts | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/app/javascript/mastodon/features/emoji/emoji_utils.ts b/app/javascript/mastodon/features/emoji/emoji_utils.ts index ce30e711ade..d717f5b85f7 100644 --- a/app/javascript/mastodon/features/emoji/emoji_utils.ts +++ b/app/javascript/mastodon/features/emoji/emoji_utils.ts @@ -216,31 +216,6 @@ function intersect(a: [], b: []) { return uniqA.filter((item) => uniqB.includes(item)); } -/* eslint-disable */ - -// @ts-expect-error -function deepMerge(a, b) { - let o = {}; - - for (let key in a) { - let originalValue = a[key], - value = originalValue; - - if (Object.hasOwn(b, key)) { - value = b[key]; - } - - if (typeof value === 'object') { - value = deepMerge(originalValue, value); - } - - // @ts-expect-error - o[key] = value; - } - - return o; -} - // https://github.com/sonicdoe/measure-scrollbar function measureScrollbar() { const div = document.createElement('div'); @@ -263,7 +238,6 @@ export { getSanitizedData, uniq, intersect, - deepMerge, unifiedToNative, measureScrollbar, };