[PCCompat > Webpack] Make display name getting case insensitive

This commit is contained in:
Ducko 2021-06-08 16:14:44 +01:00 committed by Alyxia Sother
parent 549bb1afec
commit 865a105079
No known key found for this signature in database
GPG Key ID: 355968D14144B739
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,8 @@ module.exports = {
}, },
getModuleByDisplayName: (displayName) => { getModuleByDisplayName: (displayName) => {
return goosemodScope.webpackModules.findByDisplayName(displayName); // Use custom find instead of GM's findByDisplayName as PC's is case insensitive
return goosemodScope.webpackModules.find((x) => x.displayName.toLowerCase() === displayName.toLowerCase);
}, },
...goosemodScope.webpackModules.common // Export common modules (eg: React) ...goosemodScope.webpackModules.common // Export common modules (eg: React)