@storyteller-platform/epub 0.6.1 → 0.6.2

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/dist/index.cjs CHANGED
@@ -1297,9 +1297,8 @@ ${JSON.stringify(element, null, 2)}`
1297
1297
  const creatorIdref = entry.properties["refines"];
1298
1298
  if (!creatorIdref) return;
1299
1299
  const creatorId = creatorIdref.slice(1);
1300
- const index = creatorEntries.findIndex((entry2) => entry2.id === creatorId);
1301
- if (index === -1) return;
1302
- const creator = creators[index];
1300
+ const creator = creatorEntries.filter((entry2) => entry2.id === creatorId && !!entry2.value).map((creator2) => ({ name: creator2.value }))[0];
1301
+ if (!creator) return;
1303
1302
  if (entry.properties["alternate-script"]) {
1304
1303
  if (!entry.properties["xml:lang"]) return;
1305
1304
  creator.alternateScripts ??= [];
package/dist/index.js CHANGED
@@ -1265,9 +1265,8 @@ ${JSON.stringify(element, null, 2)}`
1265
1265
  const creatorIdref = entry.properties["refines"];
1266
1266
  if (!creatorIdref) return;
1267
1267
  const creatorId = creatorIdref.slice(1);
1268
- const index = creatorEntries.findIndex((entry2) => entry2.id === creatorId);
1269
- if (index === -1) return;
1270
- const creator = creators[index];
1268
+ const creator = creatorEntries.filter((entry2) => entry2.id === creatorId && !!entry2.value).map((creator2) => ({ name: creator2.value }))[0];
1269
+ if (!creator) return;
1271
1270
  if (entry.properties["alternate-script"]) {
1272
1271
  if (!entry.properties["xml:lang"]) return;
1273
1272
  creator.alternateScripts ??= [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyteller-platform/epub",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",