You've already forked obsidian-visualiser
Fix comrpessing bug on null buffers, make pinned floaters resizable and optimize a few things here and there
This commit is contained in:
@@ -35,7 +35,7 @@ export default defineEventHandler(async (e) => {
|
||||
return data.content;
|
||||
}
|
||||
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
catch(_e)
|
||||
{
|
||||
|
||||
@@ -16,5 +16,10 @@ export default defineEventHandler(async (event) => {
|
||||
//@ts-expect-error
|
||||
_end.call(event.node.res, await Bun.zstdCompress(buffer), ...args);
|
||||
}
|
||||
else
|
||||
{
|
||||
//@ts-expect-error
|
||||
_end.call(event.node.res, body, ...args);
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -105,8 +105,8 @@ function reshapeContent(content: string, type: FileType): string | null
|
||||
return content;
|
||||
case "canvas":
|
||||
const data = JSON.parse(content) as CanvasContent;
|
||||
data.edges?.forEach(e => { console.log(e.color); e.color = typeof e.color === 'string' ? getColor(e.color) : undefined; console.log(e.color); });
|
||||
data.nodes?.forEach(e => { console.log(e.color); e.color = typeof e.color === 'string' ? getColor(e.color) : undefined; console.log(e.color); });
|
||||
data.edges?.forEach(e => e.color = typeof e.color === 'string' ? getColor(e.color) : undefined);
|
||||
data.nodes?.forEach(e => e.color = typeof e.color === 'string' ? getColor(e.color) : undefined);
|
||||
return JSON.stringify(data);
|
||||
default:
|
||||
case 'folder':
|
||||
|
||||
Reference in New Issue
Block a user