From e95c52f1c98e82bf159e4a9daf5452a09c0a3c44 Mon Sep 17 00:00:00 2001 From: Andrew Dillon Date: Thu, 20 Dec 2018 06:18:23 -0600 Subject: [PATCH] Remove use of spread operator (for React Native Android) --- src/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 560d0ef..083d89a 100644 --- a/src/index.js +++ b/src/index.js @@ -7,7 +7,11 @@ import base64DeflatedTrie from './trie.json'; // Trie is serialized as a Buffer in node, but here // we may be running in a browser so we make an Uint8Array -const data = JSON.parse(String.fromCharCode(...pako.inflate(base64.decode(base64DeflatedData)))); +const data = JSON.parse( + String.fromCharCode.apply( + String, pako.inflate(base64.decode(base64DeflatedData)) + ), +); const trieData = pako.inflate(base64.decode(base64DeflatedTrie)); const trie = new UnicodeTrie(trieData);