Skip to content

Commit cf8c1b1

Browse files
authored
Merge pull request #26 from cloudgraphdev/beta
Release 0.21.1
2 parents 975f505 + 5c0754f commit cf8c1b1

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## [0.21.1-beta.1](https://github.com/cloudgraphdev/sdk/compare/0.21.0...0.21.1-beta.1) (2022-07-12)
2+
3+
4+
### Bug Fixes
5+
6+
* Added validations for null arrays ([32ad697](https://github.com/cloudgraphdev/sdk/commit/32ad697c8206590e4b036d34dea678c8992610b6))
7+
8+
## [0.21.1-alpha.1](https://github.com/cloudgraphdev/sdk/compare/0.21.0...0.21.1-alpha.1) (2022-07-12)
9+
10+
11+
### Bug Fixes
12+
13+
* Added validations for null arrays ([32ad697](https://github.com/cloudgraphdev/sdk/commit/32ad697c8206590e4b036d34dea678c8992610b6))
14+
115
# [0.21.0](https://github.com/cloudgraphdev/sdk/compare/0.20.0...0.21.0) (2022-07-06)
216

317

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cloudgraph/sdk",
3-
"version": "0.21.0",
3+
"version": "0.21.1-beta.1",
44
"description": "SDK for cloud graph providers and cli",
55
"main": "dist/src/index.js",
66
"types": "dist/src/index.d.ts",

src/rules-engine/evaluators/json-evaluator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default class JsonEvaluator implements RuleEvaluator<JsonRule> {
8686
array_all: async (array = [], conditions: Condition, data) => {
8787
// an AND, but with every resource item
8888
const baseElementPath = data.elementPath
89-
for (let i = 0; i < array.length; i++) {
89+
for (let i = 0; i < array?.length; i++) {
9090
if (
9191
!(await this.evaluateCondition(conditions, {
9292
...data,
@@ -100,7 +100,7 @@ export default class JsonEvaluator implements RuleEvaluator<JsonRule> {
100100
array_any: async (array = [], conditions, data) => {
101101
// an OR, but with every resource item
102102
const baseElementPath = data.elementPath
103-
for (let i = 0; i < array.length; i++) {
103+
for (let i = 0; i < array?.length; i++) {
104104
if (
105105
await this.evaluateCondition(conditions as Condition, {
106106
...data,

0 commit comments

Comments
 (0)