{"action":"created","issue":{"url":"https://api.github.com/repos/gildata/RAIO/issues/314","repository_url":"https://api.github.com/repos/gildata/RAIO","labels_url":"https://api.github.com/repos/gildata/RAIO/issues/314/labels{/name}","comments_url":"https://api.github.com/repos/gildata/RAIO/issues/314/comments","events_url":"https://api.github.com/repos/gildata/RAIO/issues/314/events","html_url":"https://github.com/gildata/RAIO/issues/314","id":307140632,"number":314,"title":" shit `\"\"` empty string & `false` bug","user":{"login":"xgqfrms-gildata","id":29531779,"avatar_url":"https://avatars2.githubusercontent.com/u/29531779?v=4","gravatar_id":"","url":"https://api.github.com/users/xgqfrms-gildata","html_url":"https://github.com/xgqfrms-gildata","followers_url":"https://api.github.com/users/xgqfrms-gildata/followers","following_url":"https://api.github.com/users/xgqfrms-gildata/following{/other_user}","gists_url":"https://api.github.com/users/xgqfrms-gildata/gists{/gist_id}","starred_url":"https://api.github.com/users/xgqfrms-gildata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xgqfrms-gildata/subscriptions","organizations_url":"https://api.github.com/users/xgqfrms-gildata/orgs","repos_url":"https://api.github.com/users/xgqfrms-gildata/repos","events_url":"https://api.github.com/users/xgqfrms-gildata/events{/privacy}","received_events_url":"https://api.github.com/users/xgqfrms-gildata/received_events","type":"User","site_admin":false},"labels":[{"id":635124909,"url":"https://api.github.com/repos/gildata/RAIO/labels/bug","name":"bug","color":"ee0701","default":true},{"id":874451226,"url":"https://api.github.com/repos/gildata/RAIO/labels/shit%20%60%22%22%60%20empty%20string%20&%20%60false%60%20bug","name":"shit `\"\"` empty string & `false` bug","color":"e5449d","default":false}],"state":"open","locked":true,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-21T07:21:23Z","updated_at":"2018-03-22T07:58:40Z","closed_at":null,"author_association":"COLLABORATOR","body":"# shit `\"\"` empty string & `false` bug\r\n\r\n```js\r\n\r\nconst temp_url_obj = {\r\n    ApiName: \"NQ.F9.QuickReference.BigNews\",\r\n    SecuCode: \"600570\",\r\n    Type: \"\",\r\n    WriteType: \"json\"\r\n};\r\n\r\nif(temp_url_obj[\"Type\"]){\r\n    console.log(`OK`);\r\n}else{\r\n    console.log(`Error`);\r\n}\r\n```\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/29531779/37698018-6f15f1ca-2d1b-11e8-8c9a-b624d9f182cc.png)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/gildata/RAIO/issues/comments/375209701","html_url":"https://github.com/gildata/RAIO/issues/314#issuecomment-375209701","issue_url":"https://api.github.com/repos/gildata/RAIO/issues/314","id":375209701,"user":{"login":"xgqfrms-gildata","id":29531779,"avatar_url":"https://avatars2.githubusercontent.com/u/29531779?v=4","gravatar_id":"","url":"https://api.github.com/users/xgqfrms-gildata","html_url":"https://github.com/xgqfrms-gildata","followers_url":"https://api.github.com/users/xgqfrms-gildata/followers","following_url":"https://api.github.com/users/xgqfrms-gildata/following{/other_user}","gists_url":"https://api.github.com/users/xgqfrms-gildata/gists{/gist_id}","starred_url":"https://api.github.com/users/xgqfrms-gildata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xgqfrms-gildata/subscriptions","organizations_url":"https://api.github.com/users/xgqfrms-gildata/orgs","repos_url":"https://api.github.com/users/xgqfrms-gildata/repos","events_url":"https://api.github.com/users/xgqfrms-gildata/events{/privacy}","received_events_url":"https://api.github.com/users/xgqfrms-gildata/received_events","type":"User","site_admin":false},"created_at":"2018-03-22T07:58:40Z","updated_at":"2018-03-22T07:58:40Z","author_association":"COLLABORATOR","body":"# wrap function\r\n\r\n> params & customize\r\n\r\n```js\r\n    // enum ??? type ??? index.name\r\n    onTypeSelectChange = (obj) => {\r\n        // console.log(`obj =`, obj);\r\n        let name = obj.name,\r\n            value = obj.value;\r\n        // index.name\r\n        let string_value = ``;\r\n        if(value !== undefined){\r\n            string_value = value.toString();\r\n        }\r\n        let temp_url_obj = this.state.url_obj;\r\n        // console.log(`temp_url_obj = `, temp_url_obj);\r\n        // console.log(`temp_url_obj[\"Type\"] = `, temp_url_obj[\"Type\"], typeof temp_url_obj[\"Type\"]);\r\n        // if(temp_url_obj[\"Type\"] !== undefined){\r\n        //     // console.log(`OK`);\r\n        //     temp_url_obj[\"Type\"] = string_value;\r\n        // }else{\r\n        //     // console.log(`Error`);\r\n        // }\r\n        if(temp_url_obj[name] !== undefined){\r\n            // console.log(`OK`);\r\n            temp_url_obj[name] = string_value;\r\n        }else{\r\n            // console.log(`Error`);\r\n        }\r\n        let str_obj = JSON.stringify(temp_url_obj);\r\n        if(/\"\"/ig.test(str_obj)){\r\n            this.props.disableBTN(true);\r\n        }else{\r\n            this.props.disableBTN(false);\r\n        }\r\n        // get changed table values\r\n        this.setState({\r\n            url: `${urls.test}?${str_obj}`\r\n        });\r\n        this.autoSave();\r\n    };\r\n```\r\n"}}
{"actor":{"display_login":"xgqfrms-gildata"}}