support custom icons

This commit is contained in:
codetypes committed 2024-04-17 13:29:10 +08:00
1 parent 1c0ac119f4
commit b81d9449c9
8 files changed
+16 -6

No files matched your search

+2 -2
View File
@@ -68,13 +68,13 @@ export const Inspector: FC = () => {
if (node) {
node.input?.forEach((v, i) => {
const desc = node.def.input?.[i] ?? "<unknown>";
if (v && !options.find((option) => option.value !== v)) {
if (v && !options.find((option) => option.value === v)) {
options.push({ label: `${v}(${desc})`, value: v });
}
});
node.output?.forEach((v, i) => {
const desc = node.def.output?.[i] ?? "<unknown>";
if (v && !options.find((option) => option.value !== v)) {
if (v && !options.find((option) => option.value === v)) {
options.push({ label: `${v}(${desc})`, value: v });
}
});