From 575be32c05e5bd465719a079f131be88d527c881 Mon Sep 17 00:00:00 2001 From: Georgii Dolzhykov Date: Thu, 4 Feb 2021 13:42:47 +0200 Subject: [PATCH] Minor fixes in doc-debug --- src/document/doc-debug.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/document/doc-debug.js b/src/document/doc-debug.js index f824ceb12..0c90ab5f2 100644 --- a/src/document/doc-debug.js +++ b/src/document/doc-debug.js @@ -137,7 +137,7 @@ function printDocToDebug(doc) { if (doc.expandedStates) { return `conditionalGroup([${doc.expandedStates - .map(printDoc) + .map((part) => printDoc(part)) .join(",")}]${options})`; } @@ -168,7 +168,8 @@ function printDocToDebug(doc) { return printedSymbols[id]; } - const prefix = id.description || "symbol"; + // TODO: use Symbol.prototype.description instead of slice once Node 10 is dropped + const prefix = String(id).slice(7, -1) || "symbol"; for (let counter = 0; ; counter++) { const key = prefix + (counter > 0 ? ` #${counter}` : ""); if (!usedKeysForSymbols.has(key)) {