Spaces:
Paused
Paused
fix: issue with [0] causing superscript
Browse files
src/lib/components/chat/ChatMessage.svelte
CHANGED
|
@@ -47,7 +47,7 @@
|
|
| 47 |
const indices: number[] = (match.match(/\d+/g) || []).map(Number);
|
| 48 |
const links: string = indices
|
| 49 |
.map((index: number) => {
|
| 50 |
-
if (index === 0) return
|
| 51 |
const source = webSearchSources[index - 1];
|
| 52 |
if (source) {
|
| 53 |
return `<a href="${source.link}" target="_blank" rel="noreferrer" style="${linkStyle}">${index}</a>`;
|
|
|
|
| 47 |
const indices: number[] = (match.match(/\d+/g) || []).map(Number);
|
| 48 |
const links: string = indices
|
| 49 |
.map((index: number) => {
|
| 50 |
+
if (index === 0) return false;
|
| 51 |
const source = webSearchSources[index - 1];
|
| 52 |
if (source) {
|
| 53 |
return `<a href="${source.link}" target="_blank" rel="noreferrer" style="${linkStyle}">${index}</a>`;
|