From fa742930137f2f8eceee45894b43de4bf93caebe Mon Sep 17 00:00:00 2001 From: jeacott1 Date: Tue, 3 Jan 2017 12:01:53 +1030 Subject: [PATCH] fixes 64k limit on GCM push. devices = new Array(...devices); expands to include apply(,args) which is limited. --- src/GCM.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GCM.js b/src/GCM.js index 1aa551f..79ff311 100644 --- a/src/GCM.js +++ b/src/GCM.js @@ -26,7 +26,7 @@ function GCM(args) { GCM.prototype.send = function(data, devices) { let pushId = randomString(10); // Make a new array - devices = new Array(...devices); + devices=devices.slice(0); let timestamp = Date.now(); // For android, we can only have 1000 recepients per send, so we need to slice devices to // chunk if necessary