gb-image-decoder 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -479,6 +479,9 @@ const getRawRGBNImageData = (params, canvasCreator) => {
|
|
|
479
479
|
scaleFactor
|
|
480
480
|
} = params;
|
|
481
481
|
const canvases = Object.entries(tiles).reduce((acc, [key, channelTiles]) => {
|
|
482
|
+
if (!channelTiles?.length) {
|
|
483
|
+
return acc;
|
|
484
|
+
}
|
|
482
485
|
const channelKey = key;
|
|
483
486
|
const channelShades = palette[channelKey] || RGBN_SHADES;
|
|
484
487
|
const channelPalette = singleChannelPalette(channelShades, channelKey);
|
package/dist/index.mjs
CHANGED
|
@@ -477,6 +477,9 @@ const getRawRGBNImageData = (params, canvasCreator) => {
|
|
|
477
477
|
scaleFactor
|
|
478
478
|
} = params;
|
|
479
479
|
const canvases = Object.entries(tiles).reduce((acc, [key, channelTiles]) => {
|
|
480
|
+
if (!channelTiles?.length) {
|
|
481
|
+
return acc;
|
|
482
|
+
}
|
|
480
483
|
const channelKey = key;
|
|
481
484
|
const channelShades = palette[channelKey] || RGBN_SHADES;
|
|
482
485
|
const channelPalette = singleChannelPalette(channelShades, channelKey);
|