You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/rcameron/node_modules/pdfkit/lib/mixins/line_wrapper.coffee:63
len = words.length;
^
TypeError: Cannot read property 'length' of null
at LineWrapper.wrap (/Users/rcameron/node_modules/pdfkit/lib/mixins/line_wrapper.coffee:63:20)
at PDFDocument.text (/Users/rcameron/node_modules/pdfkit/lib/mixins/text.coffee:46:17)
at /Users/rcameron/pdfMaker/node-test.js:90:8
at IncomingMessage. (/Users/rcameron/pdfMaker/node-test.js:61:4)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at CleartextStream.ondata (http.js:1231:22)
at CleartextStream._push (tls.js:303:27)
at SecurePair.cycle (tls.js:577:20)
at EncryptedStream.write (tls.js:96:13)
I am seeing this issue when adding text via the doc.text method. I changed the pdfkit module to test if words was null before testing length on line 54 of line_wrapper.coffee.
if !!text.match(WORD_RE)
words = text.match(WORD_RE)
This solved the issue.
The text was updated successfully, but these errors were encountered:
/Users/rcameron/node_modules/pdfkit/lib/mixins/line_wrapper.coffee:63
len = words.length;
^
TypeError: Cannot read property 'length' of null
at LineWrapper.wrap (/Users/rcameron/node_modules/pdfkit/lib/mixins/line_wrapper.coffee:63:20)
at PDFDocument.text (/Users/rcameron/node_modules/pdfkit/lib/mixins/text.coffee:46:17)
at /Users/rcameron/pdfMaker/node-test.js:90:8
at IncomingMessage. (/Users/rcameron/pdfMaker/node-test.js:61:4)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at CleartextStream.ondata (http.js:1231:22)
at CleartextStream._push (tls.js:303:27)
at SecurePair.cycle (tls.js:577:20)
at EncryptedStream.write (tls.js:96:13)
I am seeing this issue when adding text via the doc.text method. I changed the pdfkit module to test if words was null before testing length on line 54 of line_wrapper.coffee.
if !!text.match(WORD_RE)
words = text.match(WORD_RE)
This solved the issue.
The text was updated successfully, but these errors were encountered: