kopia lustrzana https://github.com/backface/turtlestitch
no internal canvas error if inputs to new costume are 0, just return an empty costume
rodzic
5cf62d5219
commit
87931cdab0
|
@ -5109,6 +5109,9 @@ Process.prototype.reportNewCostume = function (pixels, width, height, name) {
|
|||
}
|
||||
width = Math.abs(Math.floor(+width));
|
||||
height = Math.abs(Math.floor(+height));
|
||||
if (width <= 0 || height <= 0) {
|
||||
return new Costume();
|
||||
}
|
||||
if (!isFinite(width * height) || isNaN(width * height)) {
|
||||
throw new Error(
|
||||
'expecting a finite number\nbut getting Infinity or NaN'
|
||||
|
|
Ładowanie…
Reference in New Issue