apexify.js 4.3.3 → 4.3.4

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.
@@ -63,7 +63,11 @@ export class ApexPainter {
63
63
 
64
64
  async createImage(images: ImageProperties[], canvasBuffer: CanvasResults): Promise<Buffer> {
65
65
 
66
- if (!canvasBuffer) {
66
+ if (!Array.isArray(images)) {
67
+ images = [images];
68
+ }
69
+
70
+ if (!canvasBuffer.buffer) {
67
71
  throw new Error('You need to provide your canvasConfig. Check documentation if you don\'t know.');
68
72
  }
69
73
  const existingCanvas: any = await loadImage(canvasBuffer.buffer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apexify.js",
3
- "version": "4.3.3",
3
+ "version": "4.3.4",
4
4
  "description": "Ai and Canvas library. Supports ts & js (supports front/back end).",
5
5
  "main": "./dist/index.js",
6
6
  "author": "zenith-79",