@cofondateurauchomage/libs 1.0.20 → 1.0.21

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.
@@ -4,4 +4,4 @@ import { TSkill } from "../db.model";
4
4
  * @param skills
5
5
  * @returns
6
6
  */
7
- export declare function checkSkills(skills: TSkill[]): boolean;
7
+ export declare function checkSkills(skills: TSkill[] | undefined): boolean;
@@ -8,11 +8,12 @@ const const_1 = require("../const");
8
8
  * @returns
9
9
  */
10
10
  function checkSkills(skills) {
11
- let valid = skills.length > 0 ? true : false;
12
- skills.forEach((skill) => {
13
- if (!const_1.SKILLS.includes(skill))
14
- valid = false;
15
- });
11
+ let valid = skills && skills.length > 0 ? true : false;
12
+ skills &&
13
+ skills.forEach((skill) => {
14
+ if (!const_1.SKILLS.includes(skill))
15
+ valid = false;
16
+ });
16
17
  return valid;
17
18
  }
18
19
  exports.checkSkills = checkSkills;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "main": "lib/index",
6
6
  "scripts": {