From 288b8553e7d0e4f89cb8dc167a4601bbd5e944b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 16 Aug 2014 18:22:43 +0200 Subject: [PATCH] Support PaperScript code with only one line and no breaks. --- src/core/PaperScript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/PaperScript.js b/src/core/PaperScript.js index 6a1fa9d7..467d1da2 100644 --- a/src/core/PaperScript.js +++ b/src/core/PaperScript.js @@ -280,7 +280,7 @@ Base.exports.PaperScript = (function() { var mappings = ['AAAA']; // Create empty entries by the amount of lines + 1, so join can be // used below to produce the actual instructions that many times. - mappings.length = code.match(lineBreaks).length + 1 + offset; + mappings.length = (code.match(lineBreaks) || []).length + 1 + offset; sourceMap = { version: 3, file: url,