|
@@ -68,7 +68,7 @@ export async function getDataUrlForSliceConfig(
|
|
|
const ctx = canvas.getContext("2d");
|
|
|
if (!ctx) {
|
|
|
console.log('canvas.getContext("2d") error');
|
|
|
- throw "canvas ctx error";
|
|
|
+ throw new Error("canvas ctx error");
|
|
|
}
|
|
|
// drawImage 画图软件透明色
|
|
|
ctx.drawImage(
|
|
@@ -140,7 +140,7 @@ export async function getDataUrlForSplitConfig(
|
|
|
const ctx = canvas.getContext("2d");
|
|
|
if (!ctx) {
|
|
|
console.log('canvas.getContext("2d") error');
|
|
|
- throw "canvas ctx error";
|
|
|
+ throw new Error("canvas ctx error");
|
|
|
}
|
|
|
// drawImage 画图软件透明色
|
|
|
ctx.drawImage(
|