From f261d5ad3396455d4c0beb1ce4f98520c51cb9a5 Mon Sep 17 00:00:00 2001 From: abe33 Date: Fri, 30 Oct 2015 19:38:56 +0100 Subject: [PATCH] :bug: Fix unusual issue if an invisible char is not a string Fixes #397 --- lib/mixins/canvas-drawer.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mixins/canvas-drawer.coffee b/lib/mixins/canvas-drawer.coffee index 1a4733d6..1e817aed 100644 --- a/lib/mixins/canvas-drawer.coffee +++ b/lib/mixins/canvas-drawer.coffee @@ -216,7 +216,7 @@ class CanvasDrawer extends Mixin invisibles.push line.invisibles.space if line.invisibles.space? invisibles.push line.invisibles.tab if line.invisibles.tab? - ///#{invisibles.map(_.escapeRegExp).join('|')}///g + ///#{invisibles.filter((s) -> typeof s is 'string').map(_.escapeRegExp).join('|')}///g # Internal: Draws a single token on the given context. #