From efbc2ffe6a1ee5ec38a4396305561d6515d0943e Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 30 Aug 2024 17:21:18 +0800 Subject: node fixes, updates --- node_modules/yaml/dist/stringify/stringifyPair.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'node_modules/yaml/dist/stringify/stringifyPair.js') diff --git a/node_modules/yaml/dist/stringify/stringifyPair.js b/node_modules/yaml/dist/stringify/stringifyPair.js index f5fc0ba9..716ea9a1 100644 --- a/node_modules/yaml/dist/stringify/stringifyPair.js +++ b/node_modules/yaml/dist/stringify/stringifyPair.js @@ -12,7 +12,7 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) { if (keyComment) { throw new Error('With simple keys, key nodes cannot have comments'); } - if (identity.isCollection(key)) { + if (identity.isCollection(key) || (!identity.isNode(key) && typeof key === 'object')) { const msg = 'With simple keys, collection cannot be used as a key value'; throw new Error(msg); } -- cgit v1.2.3