mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-23 06:55:09 +00:00
Make sure i18n find does not match the wrong mapping
This commit is contained in:
parent
edf6480b8f
commit
71ade7d658
2 changed files with 3 additions and 4 deletions
|
@ -16,7 +16,6 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { runtimeHashMessageKey } from "@utils/intlHash";
|
||||
import type { Channel } from "discord-types/general";
|
||||
|
||||
// eslint-disable-next-line path-alias/no-relative
|
||||
|
@ -58,8 +57,8 @@ export const { match, P }: Pick<typeof import("ts-pattern"), "match" | "P"> = ma
|
|||
export const lodash: typeof import("lodash") = findByPropsLazy("debounce", "cloneDeep");
|
||||
|
||||
export const i18n = mapMangledModuleLazy('defaultLocale:"en-US"', {
|
||||
t: filters.byProps(runtimeHashMessageKey("DISCORD")),
|
||||
intl: filters.byProps("string", "format"),
|
||||
t: m => m?.[Symbol.toStringTag] === "IntlMessagesProxy",
|
||||
intl: m => m != null && Object.getPrototypeOf(m)?.withFormatters != null
|
||||
}, true);
|
||||
|
||||
export let SnowflakeUtils: t.SnowflakeUtils;
|
||||
|
|
|
@ -504,7 +504,7 @@ function getAllPropertyNames(object: Record<PropertyKey, any>, includeNonEnumera
|
|||
|
||||
const getKeys = includeNonEnumerable ? Object.getOwnPropertyNames : Object.keys;
|
||||
do {
|
||||
getKeys(object).forEach(name => names.add(name));
|
||||
getKeys(object).forEach(name => name !== "__esModule" && names.add(name));
|
||||
object = Object.getPrototypeOf(object);
|
||||
} while (object != null);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue