Skip to content

Commit 635eafc

Browse files
committed
fix display filename on the dropdown
Signed-off-by: Ricardo M G da Silva <rephyrus0877@protonmail.com>
1 parent fa2802b commit 635eafc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/TDViewer/TDViewer.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ export default function TDViewer() {
6868
fileHandle: file,
6969
};
7070
try {
71+
let linkedTd = {};
72+
linkedTd[fileData.fileName] = fileData.fileHandle
7173
context.updateOfflineTD(fileData.td);
7274
context.updateIsModified(false);
7375
context.setFileHandle(fileData.fileName);
7476
context.updateLinkedTd(undefined);
75-
context.addLinkedTd(fileData.fileHandle);
77+
context.addLinkedTd(linkedTd);
7678
} catch (e) {
7779
console.error("File processing:", e);
7880
}
@@ -86,8 +88,7 @@ export default function TDViewer() {
8688
onDrop,
8789
accept: {
8890
"application/json": [".json"],
89-
"application/ld+json": [".jsonld"],
90-
"text/csv": [".csv"],
91+
"application/ld+json": [".jsonld"]
9192
},
9293
noClick: true,
9394
maxFiles: 1,

0 commit comments

Comments
 (0)