{"action":"created","issue":{"url":"https://api.github.com/repos/less/less.js/issues/2430","labels_url":"https://api.github.com/repos/less/less.js/issues/2430/labels{/name}","comments_url":"https://api.github.com/repos/less/less.js/issues/2430/comments","events_url":"https://api.github.com/repos/less/less.js/issues/2430/events","html_url":"https://github.com/less/less.js/issues/2430","id":56307943,"number":2430,"title":"Compiling empty less file causes the map to contain string \"undefined\"","user":{"login":"OhJeez","id":3941091,"avatar_url":"https://avatars.githubusercontent.com/u/3941091?v=3","gravatar_id":"","url":"https://api.github.com/users/OhJeez","html_url":"https://github.com/OhJeez","followers_url":"https://api.github.com/users/OhJeez/followers","following_url":"https://api.github.com/users/OhJeez/following{/other_user}","gists_url":"https://api.github.com/users/OhJeez/gists{/gist_id}","starred_url":"https://api.github.com/users/OhJeez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OhJeez/subscriptions","organizations_url":"https://api.github.com/users/OhJeez/orgs","repos_url":"https://api.github.com/users/OhJeez/repos","events_url":"https://api.github.com/users/OhJeez/events{/privacy}","received_events_url":"https://api.github.com/users/OhJeez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/less/less.js/labels/Bug","name":"Bug","color":"e10c02"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-02T23:06:07Z","updated_at":"2015-05-11T07:40:24Z","closed_at":"2015-02-06T22:35:27Z","body":"The following:\r\n`lessc empty.less --source-map=test.map out.css`\r\nwhere \"empty.less\" is, well, empty (0 bytes) causes test.map to have following content:\r\n````\r\nundefined\r\n`````\r\nSame happens if \"empty.less\" produces no css, e.g. has only variable definitions.\r\nPossibly related: less/less.js#1491 and plus3network/gulp-less#121 - very strange error that comes from following line:\r\n`return new Buffer(str).toString('base64')`\r\nfrom `lib/less-node/environment.js`\r\nWhen `str === undefined` new Buffer throws. At first glance seems that the reason str is undefined is the same as that \"undefined\" gets written to map file.\r\n\r\n\r\nLess version: less@2.3.1"},"comment":{"url":"https://api.github.com/repos/less/less.js/issues/comments/100798916","html_url":"https://github.com/less/less.js/issues/2430#issuecomment-100798916","issue_url":"https://api.github.com/repos/less/less.js/issues/2430","id":100798916,"user":{"login":"yatskevich","id":170454,"avatar_url":"https://avatars.githubusercontent.com/u/170454?v=3","gravatar_id":"","url":"https://api.github.com/users/yatskevich","html_url":"https://github.com/yatskevich","followers_url":"https://api.github.com/users/yatskevich/followers","following_url":"https://api.github.com/users/yatskevich/following{/other_user}","gists_url":"https://api.github.com/users/yatskevich/gists{/gist_id}","starred_url":"https://api.github.com/users/yatskevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yatskevich/subscriptions","organizations_url":"https://api.github.com/users/yatskevich/orgs","repos_url":"https://api.github.com/users/yatskevich/repos","events_url":"https://api.github.com/users/yatskevich/events{/privacy}","received_events_url":"https://api.github.com/users/yatskevich/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T07:40:24Z","updated_at":"2015-05-11T07:40:24Z","body":"Looks like there is a regression in 2.5.0. \r\n```\r\nroot@ba0c79b2ec1b:~# nodejs --version\r\nv0.10.25\r\nroot@ba0c79b2ec1b:~# npm --version\r\n1.3.10\r\nroot@ba0c79b2ec1b:~# lessc --version\r\nlessc 2.5.0 (Less Compiler) [JavaScript]\r\nroot@ba0c79b2ec1b:~# lessc empty.less --source-map=empty.css.map empty.css\r\n```\r\n\r\n`empty.css.map` contains `undefined`."}}