taleem-player 1.0.18 → 1.0.19
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.
|
@@ -422,15 +422,14 @@ var EqSlide = {
|
|
|
422
422
|
type: "eq",
|
|
423
423
|
lines,
|
|
424
424
|
render({ activeIndex = -1 } = {}) {
|
|
425
|
-
const safeIndex = activeIndex
|
|
426
|
-
const
|
|
427
|
-
const activeLine = safeIndex >= 0 && safeIndex < lines.length ? lines[safeIndex] : null;
|
|
425
|
+
const safeIndex = activeIndex >= 0 && activeIndex < lines.length ? activeIndex : 0;
|
|
426
|
+
const activeLine = lines[safeIndex] || null;
|
|
428
427
|
const spItems = activeLine?.spItems ?? [];
|
|
429
428
|
return `
|
|
430
429
|
<section class="slide eq">
|
|
431
430
|
|
|
432
431
|
<ul class="eq-lines">
|
|
433
|
-
${
|
|
432
|
+
${lines.map((line, index) => {
|
|
434
433
|
return `
|
|
435
434
|
<li class="eq-line ${index === safeIndex ? "highlighted" : ""}">
|
|
436
435
|
${line.content}
|
|
@@ -454,15 +454,14 @@ var TaleemPlayer = (() => {
|
|
|
454
454
|
type: "eq",
|
|
455
455
|
lines,
|
|
456
456
|
render({ activeIndex = -1 } = {}) {
|
|
457
|
-
const safeIndex = activeIndex
|
|
458
|
-
const
|
|
459
|
-
const activeLine = safeIndex >= 0 && safeIndex < lines.length ? lines[safeIndex] : null;
|
|
457
|
+
const safeIndex = activeIndex >= 0 && activeIndex < lines.length ? activeIndex : 0;
|
|
458
|
+
const activeLine = lines[safeIndex] || null;
|
|
460
459
|
const spItems = activeLine?.spItems ?? [];
|
|
461
460
|
return `
|
|
462
461
|
<section class="slide eq">
|
|
463
462
|
|
|
464
463
|
<ul class="eq-lines">
|
|
465
|
-
${
|
|
464
|
+
${lines.map((line, index) => {
|
|
466
465
|
return `
|
|
467
466
|
<li class="eq-line ${index === safeIndex ? "highlighted" : ""}">
|
|
468
467
|
${line.content}
|