[Pkg-javascript-commits] [node-clean-yaml-object] 11/21: add `object` to `seen` array later
Bastien Roucariès
rouca at moszumanska.debian.org
Thu Sep 7 09:52:18 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-clean-yaml-object.
commit 754eded555173452bb725322fb0b079ad76ad430
Author: James Talmage <james at talmage.io>
Date: Sat Jan 16 01:15:19 2016 -0500
add `object` to `seen` array later
only once we are sure we need it
---
index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/index.js b/index.js
index 7e315fc..77b0816 100644
--- a/index.js
+++ b/index.js
@@ -12,8 +12,6 @@ function cleanYamlObj(object, filter, isRoot, seen) {
return object.toString();
}
- seen = seen.concat([object]);
-
if (Buffer.isBuffer(object)) {
return 'Buffer\n' + object.toString('hex').split('')
.reduce(function (set, c) {
@@ -36,6 +34,8 @@ function cleanYamlObj(object, filter, isRoot, seen) {
return object.toString();
}
+ seen = seen.concat([object]);
+
var isArray = Array.isArray(object);
// Fill in any holes. This means we lose expandos,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-clean-yaml-object.git
More information about the Pkg-javascript-commits
mailing list