Jasonette / JASONETTE-iOS

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

broken initialization of variables vs. rendering #306

Closed cpg closed 6 years ago

cpg commented 6 years ago

I think a recent commit broke a core part of my app related to templates. It broke in iOS only after also pulling develop in Android.

Example: https://jasonbase.com/things/0640/

Basically, I have some data items going into a view, which are initialized onto variables with $set on $load and upon success, $render takes place. The user may have set those before and they are potentially populated in the back-end DB.

In the latest develop (for iOS only!) they come up with a default value that has the template, e.g a notes text field has {{ $get.notes }} in the value of the text instead of what's initialized in the notes variable. It appears as if initialization is not done before rendering.

It took a long long time to get it working in both iOS and Android (and it was still not right). It was all developed based on this discussion.

gliechtenstein commented 6 years ago

I discovered a bug just a minute ago and may have fixed it. Please pull from the latest develop and check.

cpg commented 6 years ago

fixed