summaryrefslogtreecommitdiff
path: root/node_modules/yaml/browser/dist/doc
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-14 20:57:16 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-14 20:57:16 +0800
commit924a88fab5466307aba0b76d36b30ab06b11dcb5 (patch)
tree088b6e0beeef92d55e2b2ca523af3501b27a2830 /node_modules/yaml/browser/dist/doc
parenta240fe4a4810b7f0c678a8519832fa37afaad265 (diff)
updates
Diffstat (limited to 'node_modules/yaml/browser/dist/doc')
-rw-r--r--node_modules/yaml/browser/dist/doc/directives.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/node_modules/yaml/browser/dist/doc/directives.js b/node_modules/yaml/browser/dist/doc/directives.js
index d8b96864..aa56441c 100644
--- a/node_modules/yaml/browser/dist/doc/directives.js
+++ b/node_modules/yaml/browser/dist/doc/directives.js
@@ -120,8 +120,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}`);