mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-22 06:54:42 +00:00
Update path.class.js
This commit is contained in:
parent
b57e37bd5e
commit
d36945f6e2
2 changed files with 6 additions and 6 deletions
|
|
@ -78,7 +78,7 @@
|
|||
this.setOptions(options);
|
||||
|
||||
if (!path) {
|
||||
throw new Error('`path` argument is required');
|
||||
path = [ ];
|
||||
}
|
||||
|
||||
var fromArray = _toString.call(path) === '[object Array]';
|
||||
|
|
@ -888,10 +888,10 @@
|
|||
aY.push(y);
|
||||
}
|
||||
|
||||
var minX = min(aX),
|
||||
minY = min(aY),
|
||||
maxX = max(aX),
|
||||
maxY = max(aY),
|
||||
var minX = min(aX) || 0,
|
||||
minY = min(aY) || 0,
|
||||
maxX = max(aX) || 0,
|
||||
maxY = max(aY) || 0,
|
||||
deltaX = maxX - minX,
|
||||
deltaY = maxY - minY,
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
error = err;
|
||||
}
|
||||
|
||||
ok(error, 'should throw error');
|
||||
ok(typeof error === 'undefined', 'should not throw error on empty path');
|
||||
start();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue