From 118e54ad9e6cb94a3f1290551cd2694f8c5a107a Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Sun, 16 Aug 2015 01:52:12 +1000 Subject: [PATCH] restructure decodeCodePointsArray comment --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index ec7b75d..c47a92d 100644 --- a/index.js +++ b/index.js @@ -635,12 +635,12 @@ function decodeLargeCodePointsArray (array) { } function decodeCodePointsArray (array) { - if (array.length < 0x10000) { - return String.fromCharCode.apply(String, array) - } - // Decode using string concatenation to avoid "call stack size exceeded". // Based on http://stackoverflow.com/a/22747272/680742, the browser with - // the lowest limit is Chrome, with 0x10000 args. + // the lowest argument limit is Chrome, with 0x10000 args. + if (array.length < 0x10000) return String.fromCharCode.apply(String, array) + + // If above that limit, decode using string concatenation + // to avoid "call stack size exceeded". return decodeLargeCodePointsArray(array) } -- 2.34.1