mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
fix(editor): workaround empty content in worker renderer (#10043)
This commit is contained in:
@@ -65,6 +65,10 @@ class SectionPainter {
|
||||
paint(section: SectionLayout) {
|
||||
const { canvas, ctx } = this;
|
||||
if (!canvas || !ctx) return;
|
||||
if (section.rect.w === 0 || section.rect.h === 0) {
|
||||
console.warn('empty section rect');
|
||||
return;
|
||||
}
|
||||
|
||||
ctx.scale(this.zoom, this.zoom);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user