Jasonette / JASONETTE-iOS

📡 Native App over HTTP, on iOS
https://www.jasonette.com
MIT License
5.26k stars 352 forks source link

$lambda function call stack bug #279

Open gliechtenstein opened 6 years ago

gliechtenstein commented 6 years ago

There's a little bug with $lambda.

It happens only in a complicated situation so most people probably haven't experienced this yet, but it's important regardless.

Basically happens when a function C triggers function B, which triggers function A. The return value of function A needs to propagate all the way back to function C when using $return.success, but that's not how it's working right now.

{
  "C": {
    "trigger": "B",
    "success": {
      "type": "$render"
    }
  },
  "B": {
    "trigger": "A",
    "success": {
      "type": "$return.success",
      "options": "{{$jason}}"
    }
  },
  "A": {
    "type": "$network.request",
    "options": {
      ...
    },
    "success": {
      "type": "$return.success",
      "options": "{{$jason}}"
    }
  }
}