Check if points is an Array before parsing arguments.
This commit is contained in:
Petar Petrov 2014-07-12 22:50:48 +02:00
parent 0b903bf792
commit 78771d875b

View file

@ -950,7 +950,9 @@ Phaser.Physics.P2.Body.prototype = {
options = options || {};
points = Array.prototype.slice.call(arguments, 1);
if (!Array.isArray(points)) {
points = Array.prototype.slice.call(arguments, 1);
}
var path = [];