diff options
Diffstat (limited to 'node_modules/yaml/browser')
| -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}`); |
