Skip to content

Commit

Permalink
Fix small issues in Mvc.js
Browse files Browse the repository at this point in the history
scottaddie authored and dougbu committed Oct 26, 2015
1 parent b5bfdde commit 92afcaa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions samples/MvcSample.Web/wwwroot/Scripts/Mvc.js
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

var MVC = (function () {
"use strict";

// Takes the data which needs to be converted to form-url encoded format understadable by MVC.
// This does not depend on jQuery. Can be used independently.
var _stringify = function (data) {
@@ -21,15 +23,15 @@ var MVC = (function () {

// An '&' is appended at the end. Removing it.
return result.substring(0, result.length - 1);
}
};

function process(key, value, prefix) {
// Ignore functions.
if (typeof value === "function") {
return;
}

if (Object.prototype.toString.call(value) === '[object Array]') {
if (Object.prototype.toString.call(value) === "[object Array]") {
var result = "";
for (var i = 0; i < value.length; i++) {
var tempPrefix = (prefix || key) + "[" + i + "]";

0 comments on commit 92afcaa

Please sign in to comment.