GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — TypeError: object null is not iterable · Issue #501 · eemeli/yaml Closed Labels bugSomething isn't working DescriptionDescribe the bug Line 146 in e8576e8
To Reproduce > const yaml = await import("yaml") undefined > const data = '!!�������p: >�: >\n|\x18\x00\x00pro��)�������������������: !!\r: !!: >\n\x07\x04\x00ke' undefined > const docs = yaml.parseDocument(data) Uncaught: TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator)) at Directives.tagName (/home/maxx/dev/security/oss-fuzz-projects/yaml/dist/doc/directives.js:121:36) at Object.composeScalar (/home/maxx/dev/security/oss-fuzz-projects/yaml/dist/compose/compose-scalar.js:13:26) at composeNode (/home/maxx/dev/security/oss-fuzz-projects/yaml/dist/compose/compose-node.js:24:34) at Object.resolveBlockMap (/home/maxx/dev/security/oss-fuzz-projects/yaml/dist/compose/resolve-block-map.js:56:15) at resolveCollection (/home/maxx/dev/security/oss-fuzz-projects/yaml/dist/compose/compose-collection.js:13:27) at Object.composeCollection (/home/maxx/dev/security/oss-fuzz-projects/yaml/dist/compose/compose-collection.js:47:16) at Object.composeNode (/home/maxx/dev/security/oss-fuzz-projects/yaml/dist/compose/compose-node.js:31:38) at Object.composeDoc (/home/maxx/dev/security/oss-fuzz-projects/yaml/dist/compose/compose-doc.js:33:23) at Composer.next (/home/maxx/dev/security/oss-fuzz-projects/yaml/dist/compose/composer.js:149:40) at next (<anonymous>) Expected behaviour Versions (please complete the following information):
Additional context diff --git a/src/doc/directives.ts b/src/doc/directives.ts index add18fc..896c584 100644 --- a/src/doc/directives.ts +++ b/src/doc/directives.ts @@ -143,7 +143,12 @@ export class Directives { return verbatim } - const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/) as string[] + const matched = source.match(/^(.*!)([^!]*)$/) as string[] + if (!matched) { + onError(`The ${source} tag is invalid`) + return null + } + const [, handle, suffix] = matched if (!suffix) onError(`The ${source} tag has no suffix`) const prefix = this.tags[handle] if (prefix) { but i was not able to reproduce this with single error message in Activity
MetadataMetadataAssigneesLabelsbugSomething isn't working TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |