From 43b82e648535b3e919443b9778f3f9f4e3c11675 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 12 Feb 2015 11:20:43 -0500 Subject: fix ascii import --- js/clipboard.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'js/clipboard.js') diff --git a/js/clipboard.js b/js/clipboard.js index 0acc3c7..535e333 100644 --- a/js/clipboard.js +++ b/js/clipboard.js @@ -116,8 +116,11 @@ var clipboard = (function () { import_text: function () { var data = import_textarea.value lines = data.split("\n") - var width = lines.reduce(function(a,b){ return Math.max(a, b.length) }) + console.log(data) + console.log(lines) + var width = lines.reduce(function(a,b){ console.log(a,b); return Math.max(a, b.length) }, 0) var height = lines.length +console.log(width, height) if (width > 200) { return alert("input too wide") } -- cgit v1.2.3-70-g09d2