sfc-utils 1.4.21 → 1.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/topper2.mjs +2 -0
- package/package.json +1 -1
package/components/topper2.mjs
CHANGED
|
@@ -202,11 +202,13 @@ const Topper2 = ({ settings, wcmData, mods }) => {
|
|
|
202
202
|
|
|
203
203
|
/** Converts string from spreadsheet into a list and pads the list if the length is incorrect */
|
|
204
204
|
const convertStringToList = (str, size) => {
|
|
205
|
+
// If the string is empty (ie caption/credit is not filled out), return early
|
|
205
206
|
if (!str.includes(";")) return [];
|
|
206
207
|
|
|
207
208
|
var list = str.split(";");
|
|
208
209
|
if (list.length === size) return list;
|
|
209
210
|
|
|
211
|
+
// Add filler text if the number of caption/credit entries does not match the number of images
|
|
210
212
|
for (var i = (list.length - 1); i < (size - 1); i++) {
|
|
211
213
|
list.push("");
|
|
212
214
|
}
|