From 924a88fab5466307aba0b76d36b30ab06b11dcb5 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 14 Oct 2023 20:57:16 +0800 Subject: updates --- node_modules/yaml/dist/doc/directives.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'node_modules/yaml/dist/doc/directives.js') diff --git a/node_modules/yaml/dist/doc/directives.js b/node_modules/yaml/dist/doc/directives.js index 854c7e56..2eb9d3c5 100644 --- a/node_modules/yaml/dist/doc/directives.js +++ b/node_modules/yaml/dist/doc/directives.js @@ -122,8 +122,15 @@ class Directives { if (!suffix) onError(`The ${source} tag has no suffix`); const prefix = this.tags[handle]; - if (prefix) - return prefix + decodeURIComponent(suffix); + if (prefix) { + try { + return prefix + decodeURIComponent(suffix); + } + catch (error) { + onError(String(error)); + return null; + } + } if (handle === '!') return source; // local tag onError(`Could not resolve tag: ${source}`); -- cgit v1.2.3