Skip to content

Commit 73d8f7e

Browse files
committed
fix(bug): Check if CMS config is present before accessing it
1 parent 20c070c commit 73d8f7e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • packages/fxa-content-server/app/scripts/views/pair

packages/fxa-content-server/app/scripts/views/pair/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ class PairIndexView extends FormView {
134134
if (
135135
this.cmsConfig &&
136136
this.cmsConfig.shared &&
137+
this.cmsConfig.shared.backgrounds &&
137138
this.cmsConfig.shared.backgrounds.defaultLayout
138139
) {
139140
// Not ideal, but the pairing page will be going away
@@ -169,6 +170,7 @@ class PairIndexView extends FormView {
169170
if (
170171
this.cmsConfig &&
171172
this.cmsConfig.shared &&
173+
this.cmsConfig.shared.backgrounds &&
172174
this.cmsConfig.shared.backgrounds.defaultLayout
173175
) {
174176
const textColorClass = getTextColorClassName(

0 commit comments

Comments
 (0)