This commit is contained in:
hyojun.choi 2024-07-16 17:23:43 +09:00
parent 4f057473cd
commit 6098b01c44

View File

@ -24,7 +24,7 @@ export default class QPolygon extends fabric.Group {
helpPoints = []
helpLines = []
constructor(points, options, canvas) {
if (points.length !== 4 || points.length !== 6) {
if (points.length !== 4 && points.length !== 6) {
throw new Error('Points must be 4 or 6.')
}
if (!options.fontSize) {