packer.addArray(array) fails if the array is empty and exclusiveTag: false is set
CosmoMyzrailGorynych opened this issue · comments
Cosmo Myzrail Gorynych aka CoMiGo commented
It is not a critical issue but is a case of inconsistent behavior under different settings.
To reproduce:
const Packer = require('maxrects-packer').MaxRectsPacker;
const packer = new Packer(atlasWidth, atlasHeight, 0, {
pot: true,
square: true,
tag: true,
exclusiveTag: false
});
packer.addArray([]); // Bazinga! Cannot read property 'data' of undefined
// Does work if you remove `exclusiveTag: false`