Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript error #13

Open
korora opened this issue Feb 25, 2016 · 0 comments
Open

Javascript error #13

korora opened this issue Feb 25, 2016 · 0 comments

Comments

@korora
Copy link

korora commented Feb 25, 2016

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant