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
parent
commit
1f3c7f5355
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      PVEDiscordDark/js/PVEDiscordDark.js

4
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)
}

Loading…
Cancel
Save