Fix a perfectly understandable logic error that anyone could have made
authorMike Taylor <mike@indexdata.com>
Tue, 3 Jun 2014 15:30:22 +0000 (16:30 +0100)
committerMike Taylor <mike@indexdata.com>
Tue, 3 Jun 2014 15:30:22 +0000 (16:30 +0100)
and which it would be churlish to blame me for.

src/mkws-handlebars.js

index 67b3b19..a8dc142 100644 (file)
@@ -18,7 +18,7 @@ Handlebars.registerHelper('mkws-paragraphs', function(obj, nPara, nSent) {
   if (nPara === undefined || nPara.hasOwnProperty('hash') || nPara == 0 || nPara > obj.length) {
     nPara = obj.length;
   }
-  if (nSent === undefined || nSent.hasOwnProperty('hash') || nSent == 0 || nSent > obj.length) {
+  if (nSent === undefined || nSent.hasOwnProperty('hash') || nSent == 0) {
     nSent = Infinity;
   }