Browse Source
Add actual undefined checks
Fixes #34 and any other issue that might be related to this.
pull/36/head
Weilbyte
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
PVEDiscordDark/js/PVEDiscordDark.js
|
|
@ -52,8 +52,8 @@ function patchTFAEdit() { |
|
|
|
function patchCreateWidget() { |
|
|
|
_createWidget = Ext.createWidget |
|
|
|
Ext.createWidget = function(c, p) { |
|
|
|
if (p.style) { |
|
|
|
if (c === 'component' && p.style['background-color'] === 'white') p.style['background-color'] = '#2C2F33' |
|
|
|
if (typeof p === 'object' && typeof p.style === 'object') { |
|
|
|
if (c === 'component' && typeof p.style['background-color'] === 'string' && p.style['background-color'] === 'white') p.style['background-color'] = '#2C2F33' |
|
|
|
} |
|
|
|
return _createWidget(c, p) |
|
|
|
} |
|
|
|