-
Notifications
You must be signed in to change notification settings - Fork 190
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
If model is not ready by rendering, there's an error #31
Comments
I'm having this issue too. |
Any pointers as to how to fix this? I might have the time to send a PR. |
@climatewarrior an easy way to fix it would be this. if ((oldModel? oldModel.length : 0) !== newModel.length) { OR if ((oldModel || []).length !== newModel.length) { I don't know if there is something more angular way to do it. I am assuming that when the model changes, it will change to a valid array |
@nicoabie Thanks!! Now it works :) Although I'm still getting the following error: |
@climatewarrior you are welcome, can you provide an example in jsfiddle or similar to analyze it further? |
Okay, implemented a fallback mechanism here. Can anybody doublecheck if the problem still persists? |
@akoenig It's working just fine for me, thanks!! |
Okay, cool. Thanks for the check :) Release v0.4.1 is live. |
My data source comes from a service, on a callback. Until the callback it's not available.
If I have it as an empty array,
$scope.data = []
before the service, it does work. My guess is that the code should also check if there's something in the model before accessing its.length
.The text was updated successfully, but these errors were encountered: