Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Endless loop with object #213

Closed
amunhoz opened this issue May 31, 2021 · 3 comments
Closed

BUG: Endless loop with object #213

amunhoz opened this issue May 31, 2021 · 3 comments
Assignees
Labels

Comments

@amunhoz
Copy link

amunhoz commented May 31, 2021

I'm having a problem with a loop in an object. The system stucks, using a lot of cpu and not finishing the job.
The problem does not occurs if "domains" is an array.

The information is:

 "domains": {
        "google.com.br": {
          "domain": "google.com.br",
          "info": {          
            "status": "published"
          },
          "ipv4": "142.250.219.35 - 172.217.29.131 - 172.217.8.3",
          "ipv6": "2800:3f0:4001:822::2003 - 2800:3f0:4001:812::2003 - 2607:f8b0:4004:82a::2003"
        },
       "google.com.brx": {
          "domain": "google.com.br",
          "info": {          
            "status": "published"
          },
          "ipv4": "142.250.219.35 - 172.217.29.131 - 172.217.8.3",
          "ipv6": "2800:3f0:4001:822::2003 - 2800:3f0:4001:812::2003 - 2607:f8b0:4004:82a::2003"
        }
      }

And the template is:

!!FOR nav IN domains!!
   !!=$nav.domain!! 
!!END-FOR nav!!
@jjhbw
Copy link
Collaborator

jjhbw commented May 31, 2021

Good find! I think this is a bug. I encountered this myself as well. I'll take a look. Thanks for reporting.

@jjhbw jjhbw self-assigned this May 31, 2021
@jjhbw jjhbw added the bug label May 31, 2021
jjhbw added a commit that referenced this issue May 31, 2021
…ray. Also added test that, without the fix, hangs indefinitely until Jest timeout kicks in.
@jjhbw
Copy link
Collaborator

jjhbw commented May 31, 2021

Should be fixed in next release.

@jjhbw jjhbw closed this as completed May 31, 2021
jjhbw added a commit that referenced this issue Jun 1, 2021
…ray. Also added test that, without the fix, hangs indefinitely until Jest timeout kicks in.
@dnisanity
Copy link

I get the error ObjectCommandResultError when call an object property:

[FOR breach IN breaches]
[INS $breach.number]
[END-FOR breach]

Result: ObjectCommandResultError: Result of command '$breach' is an object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants