-
Notifications
You must be signed in to change notification settings - Fork 27
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
TypeError: g.pushFromModel is not a function #61
Comments
Have you found a solution for this? I'm hitting exactly the same issue. |
I have same problem, any solution? |
same here, anyone know if this project is still being actively maintained? |
It seems if the data being updated does not exactly match the structure you have, for example if you try to update an observablearray with a string, that causes this error. In my case data coming from server was a string and I forgot to turn it into JSON first like: var dataFromServer = ko.utils.parseJson(JSONdataFromServer); before ko.viewmodel.updateFromModel(koViewModel, viewModel); After I added that error went away and it worked. Hope that helps others with this issue. |
I have an issue in which I get the message "TypeError: g.pushFromModel is not a function". This happens when I call ko.viewmodel.updateFromModel for the second time. The code is as follows:
The last line gives me the error "TypeError: g.pushFromModel is not a function". In fact, when I call the function
ko.viewmodel.updateFromModel(koViewModel, viewModel);
twice in the first section, I get the message as well.
The text was updated successfully, but these errors were encountered: