Commit 88e5f3c6 by Tim Ludwinski

Fixed lint errors

parent 9b3038da
...@@ -187,7 +187,7 @@ Released by Maypop Inc, © 2012-2016, under the MIT License. */ ...@@ -187,7 +187,7 @@ Released by Maypop Inc, © 2012-2016, under the MIT License. */
} }
function serialize(document, parentKey, maxDepth) { function serialize(document, parentKey, maxDepth) {
if(Object.prototype.hasOwnProperty.call(excludeSubkeys, parentKey.replace(".XX.", '.'))) if(Object.prototype.hasOwnProperty.call(excludeSubkeys, parentKey.replace('.XX.', '.')))
return; return;
for(var key in document) { for(var key in document) {
//skip over inherited properties such as string, length, etch //skip over inherited properties such as string, length, etch
...@@ -196,7 +196,7 @@ Released by Maypop Inc, © 2012-2016, under the MIT License. */ ...@@ -196,7 +196,7 @@ Released by Maypop Inc, © 2012-2016, under the MIT License. */
} }
var value = document[key]; var value = document[key];
if(Array.isArray(document)) if(Array.isArray(document))
key = "XX"; //translate unnamed object key from {_parent_name_}.{_index_} to {_parent_name_}.XX key = 'XX'; //translate unnamed object key from {_parent_name_}.{_index_} to {_parent_name_}.XX
result[parentKey+key] = value; result[parentKey+key] = value;
//it's an object, recurse...only if we haven't reached max depth //it's an object, recurse...only if we haven't reached max depth
if(isHash(value) && maxDepth > 1) { if(isHash(value) && maxDepth > 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment