We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
slotTitle
fields.js
1 parent daacbcf commit 89818f0Copy full SHA for 89818f0
lib/utils/fields.js
@@ -187,8 +187,12 @@ export function slotNamesForTitlesMap(fields) {
187
const fieldSymbolsAtIndex = fieldSymbolsAtIndexMap(fields);
188
let tempObject = {};
189
for (let index in fieldSymbolsAtIndex) {
190
- tempObject[fieldSymbolsAtIndex[index].slotTitle] =
191
- fieldSymbolsAtIndex[index].slotName;
+ const slotName = fieldSymbolsAtIndex[index].slotName;
+ let slotTitle = fieldSymbolsAtIndex[index].slotTitle;
192
+ // If slotTitle not specified; use slotName as slotTitle
193
+ slotTitle = slotTitle === undefined ? slotName : slotTitle;
194
+
195
+ tempObject[slotTitle] = slotName;
196
}
197
return tempObject;
198
0 commit comments