@adminforth/upload 2.14.3 → 2.14.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.
package/dist/index.js CHANGED
@@ -306,7 +306,7 @@ export default class UploadPlugin extends AdminForthPlugin {
306
306
  var _a;
307
307
  this.adminforth = adminforth;
308
308
  if (this.options.generation) {
309
- const template = (_a = this.options.generation) === null || _a === void 0 ? void 0 : _a.generationPrompt;
309
+ const template = ((_a = this.options.generation) === null || _a === void 0 ? void 0 : _a.generationPrompt) || '';
310
310
  const regex = /{{(.*?)}}/g;
311
311
  const matches = template.match(regex);
312
312
  if (matches) {
package/index.ts CHANGED
@@ -358,7 +358,7 @@ export default class UploadPlugin extends AdminForthPlugin {
358
358
  this.adminforth = adminforth;
359
359
 
360
360
  if (this.options.generation) {
361
- const template = this.options.generation?.generationPrompt;
361
+ const template = this.options.generation?.generationPrompt || '';
362
362
  const regex = /{{(.*?)}}/g;
363
363
  const matches = template.match(regex);
364
364
  if (matches) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/upload",
3
- "version": "2.14.3",
3
+ "version": "2.14.4",
4
4
  "description": "Plugin for uploading files for adminforth",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",