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

removeCircular bug #115

Closed
kentcdodds opened this issue Apr 10, 2015 · 0 comments
Closed

removeCircular bug #115

kentcdodds opened this issue Apr 10, 2015 · 0 comments
Assignees

Comments

@kentcdodds
Copy link
Contributor

This:

{
  "ivrComponents": [
    {
      "id": "n-start",
      "left": "29px",
      "top": "19px",
      "type": "INCOMING"
    },
    {
      "type": "HANGUP",
      "id": "n-HANGUP-2",
      "top": "96px",
      "left": "928px"
    },
    {
      "type": "SCHEDULE",
      "id": "n-SCHEDULE-3",
      "catchAllRule": {
        "id": "n-SCHEDULE-3-rule-0",
        "name": "All other times/days",
        "type": "SCHEDULE_RULE_COMPONENT",
        "ruleType": "CATCH_ALL"
      },
      "scheduleComponent": [
        {
          "id": "n-SCHEDULE-3-rule-0",
          "name": "All other times/days",
          "type": "SCHEDULE_RULE_COMPONENT",
          "ruleType": "CATCH_ALL"
        }
      ],
      "top": "33px",
      "left": "434px"
    }
  ],
  "name": "ivrnpe",
  "ivrComponentMappings": [
    {
      "fromIvrComponentId": "n-start",
      "toIvrComponentId": "n-SCHEDULE-3"
    },
    {
      "fromIvrComponentId": "n-SCHEDULE-3-rule-0",
      "toIvrComponentId": "n-HANGUP-2"
    }
  ]
}

Is getting transformed into this:

{
  "ivrComponents": [
    {
      "id": "n-start",
      "left": "29px",
      "top": "19px",
      "type": "INCOMING"
    },
    {
      "type": "HANGUP",
      "id": "n-HANGUP-2",
      "top": "96px",
      "left": "928px"
    },
    {
      "type": "SCHEDULE",
      "id": "n-SCHEDULE-3",
      "catchAllRule": {
        "id": "n-SCHEDULE-3-rule-0",
        "name": "All other times/days",
        "type": "SCHEDULE_RULE_COMPONENT",
        "ruleType": "CATCH_ALL"
      },
      "scheduleComponent": [
        null // <------------------------------------- that's the problem!!!!!!!!
      ],
      "top": "33px",
      "left": "434px"
    }
  ],
  "name": "ivrnpe",
  "ivrComponentMappings": [
    {
      "fromIvrComponentId": "n-start",
      "toIvrComponentId": "n-SCHEDULE-3"
    },
    {
      "fromIvrComponentId": "n-SCHEDULE-3-rule-0",
      "toIvrComponentId": "n-HANGUP-2"
    }
  ]
}

The null should be the value it was before. The same object is in the catchAllRule, but it's not circular (I can JSON.stringify).

Thanks!

@jmdobry jmdobry self-assigned this Apr 14, 2015
@jmdobry jmdobry added the bug label Apr 14, 2015
@jmdobry jmdobry added the done label Apr 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants