diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-10-14 20:57:16 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-10-14 20:57:16 +0800 |
| commit | 924a88fab5466307aba0b76d36b30ab06b11dcb5 (patch) | |
| tree | 088b6e0beeef92d55e2b2ca523af3501b27a2830 /node_modules/yaml/browser/dist/doc | |
| parent | a240fe4a4810b7f0c678a8519832fa37afaad265 (diff) | |
updates
Diffstat (limited to 'node_modules/yaml/browser/dist/doc')
| -rw-r--r-- | node_modules/yaml/browser/dist/doc/directives.js | 11 |
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}`); |
