|
@@ -855,15 +855,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
- var computedBackgroundColor = window.getComputedStyle( element ).backgroundColor;
|
|
|
- if( computedBackgroundColor ) {
|
|
|
- var rgb = colorToRgb( computedBackgroundColor );
|
|
|
+ var computedBackgroundStyle = window.getComputedStyle( element );
|
|
|
+ if( computedBackgroundStyle && computedBackgroundStyle.backgroundColor ) {
|
|
|
+ var rgb = colorToRgb( computedBackgroundStyle.backgroundColor );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( rgb && rgb.a !== 0 ) {
|
|
|
- if( colorBrightness( computedBackgroundColor ) < 128 ) {
|
|
|
+ if( colorBrightness( computedBackgroundStyle.backgroundColor ) < 128 ) {
|
|
|
slide.classList.add( 'has-dark-background' );
|
|
|
}
|
|
|
else {
|