Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #14726 from bsclifton/fix-renderer-errors
Browse files Browse the repository at this point in the history
Fix renderer errors
  • Loading branch information
bsclifton committed Jul 13, 2018
1 parent f0a4d8d commit 0f79796
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/renderer/components/preferences/payment/enabledContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ class EnabledContent extends ImmutableComponent {
}

statusMessage () {
const promo = this.props.ledgerData.get('promotion') || Immutable.Map()
const status = this.props.ledgerData.get('status') || ''
const successText = promo.getIn(['panel', 'successText'])
const promotionStatus = promo.get('promotionStatus')
const promo = (this.props.ledgerData && this.props.ledgerData.get('promotion')) || Immutable.Map()
const status = (this.props.ledgerData && this.props.ledgerData.get('status')) || ''
const successText = promo && promo.getIn(['panel', 'successText'])
const promotionStatus = promo && promo.get('promotionStatus')
let isPromotion = true

if ((!successText || !promo.has('claimedTimestamp')) && !promotionStatus) {
if ((!successText || (promo && !promo.has('claimedTimestamp'))) && !promotionStatus) {
isPromotion = false
if (status.length === 0) {
return
Expand All @@ -284,9 +284,9 @@ class EnabledContent extends ImmutableComponent {

if (isPromotion) {
showClose = true
title = successText.get('title')
message = successText.get('message')
text = promo.getIn(['panel', 'disclaimer'])
title = successText && successText.get('title')
message = successText && successText.get('message')
text = promo && promo.getIn(['panel', 'disclaimer'])
rightButton = <BrowserButton
secondaryColor
l10nId={'paymentHistoryOKText'}
Expand Down
3 changes: 3 additions & 0 deletions js/contextMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,9 @@ function mainTemplateInit (nodeProps, frame, tab) {
info['menuItemId'] = extensionContextMenu.menuItemId
if (extensionContextMenu.properties.parentId) {
info['parentMenuItemId'] = extensionContextMenu.properties.parentId
if (!templateMap[extensionContextMenu.properties.parentId]) {
return
}
if (templateMap[extensionContextMenu.properties.parentId].submenu === undefined) {
templateMap[extensionContextMenu.properties.parentId].submenu = []
}
Expand Down

0 comments on commit 0f79796

Please sign in to comment.