Skip to content

Commit 6e379a7

Browse files
committed
fix: 修复空 svg 导致的报错
1 parent 5bf109a commit 6e379a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/model/Layer/Svg.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ class Svg extends Base {
9090
}
9191
})
9292
.filter((n) => n);
93+
// 如果没有对象的话 就直接结束
94+
if (shapes.length === 0) return;
95+
9396
const fullPathString = shapes.reduce((prev, current) => {
9497
return { path: prev.path + current.path };
9598
}).path;

0 commit comments

Comments
 (0)