Update buffer trimming

This commit is contained in:
Greg Bowler 2015-01-07 16:25:02 +00:00
parent c00494eb13
commit 643e59dac7

View File

@ -2810,7 +2810,7 @@ cache(function(data, match, sendBadge, request) {
// In case the request() implementation doesn't set the request header,
// we need to remove the first line of the response.
if(buffer.indexOf("//") === 0) {
buffer = buffer.substring(buffer.indexOf("\n"));
buffer = buffer.substring(buffer.indexOf("["));
}
var data = JSON.parse(buffer);