[PCCompat > Webpack] Fix last commit not erroring if displayName was not defined

This commit is contained in:
Ducko 2021-06-08 16:16:23 +01:00 committed by Alyxia Sother
parent 865a105079
commit 5fe0bdc257
No known key found for this signature in database
GPG key ID: 355968D14144B739

View file

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