{"action":"created","issue":{"url":"https://api.github.com/repos/devtools-html/debugger.html/issues/5829","repository_url":"https://api.github.com/repos/devtools-html/debugger.html","labels_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/5829/labels{/name}","comments_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/5829/comments","events_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/5829/events","html_url":"https://github.com/devtools-html/debugger.html/issues/5829","id":310053207,"number":5829,"title":"[Preview] No preview for empty strings and false booleans","user":{"login":"kootoopas","id":601001,"avatar_url":"https://avatars2.githubusercontent.com/u/601001?v=4","gravatar_id":"","url":"https://api.github.com/users/kootoopas","html_url":"https://github.com/kootoopas","followers_url":"https://api.github.com/users/kootoopas/followers","following_url":"https://api.github.com/users/kootoopas/following{/other_user}","gists_url":"https://api.github.com/users/kootoopas/gists{/gist_id}","starred_url":"https://api.github.com/users/kootoopas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kootoopas/subscriptions","organizations_url":"https://api.github.com/users/kootoopas/orgs","repos_url":"https://api.github.com/users/kootoopas/repos","events_url":"https://api.github.com/users/kootoopas/events{/privacy}","received_events_url":"https://api.github.com/users/kootoopas/received_events","type":"User","site_admin":false},"labels":[{"id":669449515,"url":"https://api.github.com/repos/devtools-html/debugger.html/labels/not-available","name":"not-available","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-30T12:22:30Z","updated_at":"2018-03-30T13:14:47Z","closed_at":null,"author_association":"MEMBER","body":"### EDIT: This is already fixed, although I stumbled upon the issue on nightly, which uses a slightly outdated debugger.html. I just wish that there was a way to use the github master's version of the debugger on nightly so that when someone bumps on an issue while developing sth else they know that it's valid.\r\n\r\nOh well, here's the issue anyway. `¯\\_(ツ)_/¯`\r\n\r\n### STR\r\n\r\n* copy these into the file scope you want to debug:\r\n```javascript\r\n    const heey = false;\r\n    let heey1 = false;\r\n    let heey2 = true;\r\n    const heey3 = heey;\r\n    const undef = undefined;\r\n    const emptyString = \"\";\r\n    const nullDef = null;\r\n    const stringDef = \"something\";\r\n```\r\n* add a breakpoint to that scope\r\n* make the code run to pause it\r\n* on pause, hover over the variables to trigger their preview popup\r\n\r\n### ER\r\nAll variables should trigger the `Preview` popup.\r\n\r\n### AR\r\nAll variables do, except for variables that hold empty strings or false booleans:\r\n![screen shot 2018-03-30 at 13 53 50](https://user-images.githubusercontent.com/601001/38136312-4996514e-3426-11e8-8dda-321b71ba02e6.png)\r\n![screen shot 2018-03-30 at 13 53 59](https://user-images.githubusercontent.com/601001/38136313-49bae55e-3426-11e8-9095-63851389fe4d.png)\r\n![screen shot 2018-03-30 at 13 59 23](https://user-images.githubusercontent.com/601001/38136314-49e77a06-3426-11e8-81ea-c72fd0123736.png)\r\n![screen shot 2018-03-30 at 13 59 29](https://user-images.githubusercontent.com/601001/38136316-4a0bd82e-3426-11e8-8eb7-bcbb47068fb6.png)\r\n![screen shot 2018-03-30 at 13 59 40](https://user-images.githubusercontent.com/601001/38136317-4a3855f2-3426-11e8-9ea2-abb181866f11.png)\r\n![screen shot 2018-03-30 at 14 00 25](https://user-images.githubusercontent.com/601001/38136318-4a5ad0be-3426-11e8-9150-a14125f295f3.png)\r\n\r\n### Source of the problem\r\nThe falsy check of the `value` prop in `renderPreview` of `src/components/Editor/Preview/Popup.js` is responsible for this:\r\n```javascript\r\n  renderPreview() {\r\n    const { value } = this.props;\r\n    if (!value) {\r\n      return null;\r\n    }\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/devtools-html/debugger.html/issues/comments/377521681","html_url":"https://github.com/devtools-html/debugger.html/issues/5829#issuecomment-377521681","issue_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/5829","id":377521681,"user":{"login":"kootoopas","id":601001,"avatar_url":"https://avatars2.githubusercontent.com/u/601001?v=4","gravatar_id":"","url":"https://api.github.com/users/kootoopas","html_url":"https://github.com/kootoopas","followers_url":"https://api.github.com/users/kootoopas/followers","following_url":"https://api.github.com/users/kootoopas/following{/other_user}","gists_url":"https://api.github.com/users/kootoopas/gists{/gist_id}","starred_url":"https://api.github.com/users/kootoopas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kootoopas/subscriptions","organizations_url":"https://api.github.com/users/kootoopas/orgs","repos_url":"https://api.github.com/users/kootoopas/repos","events_url":"https://api.github.com/users/kootoopas/events{/privacy}","received_events_url":"https://api.github.com/users/kootoopas/received_events","type":"User","site_admin":false},"created_at":"2018-03-30T13:14:47Z","updated_at":"2018-03-30T13:14:47Z","author_association":"MEMBER","body":"@jasonLaster  Oh really? Weird, because once I pulled from the latest master and run the debugger all was well. :)"}}
{"actor":{"display_login":"kootoopas"}}