danieldiekmeier / textexpander-to-alfred3

Convert your TextExpander snippets to Alfred 3 snippets.
ISC License
62 stars 1 forks source link

Cannot read property 'slice' of undefined #11

Closed mormerod closed 5 years ago

mormerod commented 5 years ago

Tried to run and get the following error:

te2a3 Mike.textexpander /usr/local/lib/node_modules/textexpander-to-alfred3/textexpander-to-alfred3.js:26 const name = !snippet.label || snippet.label === '' ? snippet.abbreviation.slice(0, 10) : snippet.label ^

TypeError: Cannot read property 'slice' of undefined at transformSnippet (/usr/local/lib/node_modules/textexpander-to-alfred3/textexpander-to-alfred3.js:26:78) at Array.map () at textexpander2Alfred (/usr/local/lib/node_modules/textexpander-to-alfred3/textexpander-to-alfred3.js:71:6) at /usr/local/lib/node_modules/textexpander-to-alfred3/textexpander-to-alfred3.js:55:21 at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:61:3)

danieldiekmeier commented 5 years ago

I converted all my snippets over 3 years ago and haven't used TextExpander since, so I can't really do too much to help here. Especially without an example file that reproduces the error. (This is just a general advice if you want to write good issues, it will not actually help in this case.)

I‘m not really interested in spending my own time to fix this, but I‘d look at a Pull Request if someone would create one.

matthewmcvickar commented 5 years ago

@mormerod This is fixed now!