Skip to content

Commit 4ebc1b8

Browse files
committed
bit of safety for nonexistent prev
1 parent 8594936 commit 4ebc1b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shaky.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ parseASCIIArt = (string) ->
332332

333333
# Check if it can be concatenated with a previously found text annotation.
334334
prev = figures[figures.length - 1]
335-
if prev.constructor.name is 'Text' and
335+
if prev?.constructor.name is 'Text' and
336336
prev.x0 + prev.text.length + 1 is start
337337
# If they touch concatentate them.
338338
prev.text = "#{prev.text} #{text}"

0 commit comments

Comments
 (0)