File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/shared/components/challenge-detail/Specification Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,12 @@ export default function ChallengeDetailsView(props) {
59
59
forumId,
60
60
} = legacy ;
61
61
62
- const allowStockArt = _ . find ( metadata , { name : 'allowStockArt' } ) . value ;
62
+ let stockArtValue = '' ;
63
+ const allowStockArt = _ . find ( metadata , { name : 'allowStockArt' } ) ;
64
+ if ( allowStockArt ) {
65
+ stockArtValue = allowStockArt . value ;
66
+ }
67
+
63
68
let environment = '' ;
64
69
const environmentData = _ . find ( metadata , { name : 'environment' } ) ;
65
70
if ( environmentData ) {
@@ -103,7 +108,7 @@ export default function ChallengeDetailsView(props) {
103
108
const toolbarConnector = new ToolbarConnector ( ) ;
104
109
const isSaving = specsTabState === SPECS_TAB_STATES . SAVING ;
105
110
106
- const stockArtText = allowStockArt
111
+ const stockArtText = stockArtValue
107
112
? 'Stock photography is allowed in this challenge.'
108
113
: 'Stock photography is not allowed in this challenge. All submitted elements must be designed solely by you.' ;
109
114
You can’t perform that action at this time.
0 commit comments