Skip to content

Library throws error with malformed webvtt file #40

@mayeaux

Description

@mayeaux

I had a section in this file as such:

1096
01:45:13.056 --> 01:45:14.390



...mission.

And this returned an error with:

TypeError: Cannot read property 'split' of undefined
    at parseCue (node_modules/node-webvtt/lib/parser.js:142:26)
    at cues.map (node_modules/node-webvtt/lib/parser.js:91:16)
    at Array.map (<anonymous>)
    at parseCues (node_modules/node-webvtt/lib/parser.js:89:6)
    at Object.parse (node_modules/node-webvtt/lib/parser.js:57:28)
    at main (anthony/parse.js:8122:27)
    at Object.<anonymous> (anthony/parse.js:8134:1)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)

I couldn't track down where in the webvtt it was either that was difficult.

Desired effect is that even given this malformed webvtt that it either parses it or gives back an error in the expected format

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions