Skip to content

Javascript error #13

@korora

Description

@korora

Hi.
I found that there is a case that planning.js can't read json correctly and crashes.
It seems that it depends on the content of body elements in issues.js.
When we got crashes, the content of issue were Japanese text and copies from console outputs from a project.
Maybe you could omit body element from issues.js like followings?


diff --git a/github.js b/github.js
index bdc69b8..f090055 100644
--- a/github.js
+++ b/github.js
@@ -47,8 +47,14 @@ module.exports = function(config) {
             'User-Agent': userAgent
          }
       }, function (error, response, body) {
-
-         var issues = (tmpIssues ? tmpIssues : []).concat(JSON.parse(body));
+        var _b = JSON.parse(body);
+        var i;
+        for(i = 0; i < _b.length; i++){
+            _b[i].body = "";
+        }
+        
+//         var issues = (tmpIssues ? tmpIssues : []).concat(JSON.parse(body));
+         var issues = (tmpIssues ? tmpIssues : []).concat(_b);

2016-02-25 12 52 16

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions