Comparing version 0.5.0 to 0.5.1
{ | ||
"name": "corridor", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "JSON -> HTML -> JSON data corridor", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -493,3 +493,3 @@ # corridor | ||
Since the expand feature is more intrusive in its side-effects in the DOM, you must enable it explicitly either by setting the `data-enabled` option, or in the options argument to the `corridor()` function. | ||
Since the expand feature is more intrusive in its side-effects in the DOM, you must enable it explicitly either by setting the `data-expand` option, or in the options argument to the `corridor()` function. | ||
@@ -496,0 +496,0 @@ ## corridor API |
@@ -132,3 +132,3 @@ /** | ||
settings = extend({}, defaults, opts), | ||
data = {}, | ||
data = undefined, | ||
fields = selectFields(root, settings) | ||
@@ -165,3 +165,7 @@ .filter(function(elem) { | ||
// merge contribution into the result data | ||
merge(data, JSON.parse(value)); | ||
value = JSON.parse(value); | ||
if (data === undefined) { | ||
data = arraylike(value) ? [] : {}; | ||
} | ||
data = merge(data, value); | ||
@@ -199,3 +203,3 @@ }); | ||
// used to figure out true contribution paths for inserting data into elements | ||
workspace = {}, | ||
workspace = arraylike(data) ? [] : {}, | ||
@@ -222,3 +226,3 @@ fields = selectFields(root, settings) | ||
// insert into workspace | ||
merge(workspace, target); | ||
workspace = merge(workspace, target); | ||
@@ -225,0 +229,0 @@ // find path to target in workspace |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167918
2014