diff --git a/package.json b/package.json index 4cedbc1..e4ef7c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jlenon7/templating", - "version": "1.0.3", + "version": "1.0.4", "description": "", "license": "MIT", "author": "João Lenon", diff --git a/src/FieldsSanitizer.ts b/src/FieldsSanitizer.ts index c8065d6..f9c4dc4 100644 --- a/src/FieldsSanitizer.ts +++ b/src/FieldsSanitizer.ts @@ -1,5 +1,7 @@ export class FieldsSanitizer { static validateAll(options: string[]) { + if (!options || !options.length) return + const json = {} options.forEach(option => {