@@ -440,14 +440,14 @@ function cardString(template, components) {
440 mascotCode = kMascotImageCode.arg(mascotAnchors).arg(mascotImageVisible);
440 mascotCode = kMascotImageCode.arg(mascotAnchors).arg(mascotImageVisible);
443− var summaryColorWithBackground = 'backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
443+ var summaryColorWithBackground = 'backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
445 var hasTitleContainer = hasTitle && (hasEmblem || (hasMascot && (hasSubtitle || hasAttributes)));
445 var hasTitleContainer = hasTitle && (hasEmblem || (hasMascot && (hasSubtitle || hasAttributes)));
446 var titleSubtitleCode = '';
446 var titleSubtitleCode = '';
447 if (hasTitle) {
447 if (hasTitle) {
448 var titleColor;
448 var titleColor;
449 if (headerAsOverlay) {
449 if (headerAsOverlay) {
450− titleColor = 'root.scopeStyle ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
450+ titleColor = 'root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
451 } else if (hasSummary) {
451 } else if (hasSummary) {
452 titleColor = 'summary.color';
452 titleColor = 'summary.color';
453 } else if (hasBackground) {
453 } else if (hasBackground) {