Skip to content

Commit

Permalink
Partially revert change to postJson
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSanderson committed Jan 30, 2013
1 parent 781f2b5 commit e02b63c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,12 +443,13 @@ ko.utils = (function () {
form.style.display = "none";
form.action = url;
form.method = "post";
objectForEach(data, function(key, value) {
for (var key in data) {
// Since 'data' this is a model object, we include all properties including those inherited from its prototype
var input = document.createElement("input");
input.name = key;
input.value = ko.utils.stringifyJson(ko.utils.unwrapObservable(value));
input.value = ko.utils.stringifyJson(ko.utils.unwrapObservable(data[key]));
form.appendChild(input);
});
}
objectForEach(params, function(key, value) {
var input = document.createElement("input");
input.name = key;
Expand Down

0 comments on commit e02b63c

Please sign in to comment.