{"action":"opened","issue":{"url":"https://api.github.com/repos/openlayers/ol3/issues/4201","labels_url":"https://api.github.com/repos/openlayers/ol3/issues/4201/labels{/name}","comments_url":"https://api.github.com/repos/openlayers/ol3/issues/4201/comments","events_url":"https://api.github.com/repos/openlayers/ol3/issues/4201/events","html_url":"https://github.com/openlayers/ol3/issues/4201","id":109244878,"number":4201,"title":"Translate interaction: unreachable/unneeded if-branch?","user":{"login":"marcjansen","id":227934,"avatar_url":"https://avatars.githubusercontent.com/u/227934?v=3","gravatar_id":"","url":"https://api.github.com/users/marcjansen","html_url":"https://github.com/marcjansen","followers_url":"https://api.github.com/users/marcjansen/followers","following_url":"https://api.github.com/users/marcjansen/following{/other_user}","gists_url":"https://api.github.com/users/marcjansen/gists{/gist_id}","starred_url":"https://api.github.com/users/marcjansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcjansen/subscriptions","organizations_url":"https://api.github.com/users/marcjansen/orgs","repos_url":"https://api.github.com/users/marcjansen/repos","events_url":"https://api.github.com/users/marcjansen/events{/privacy}","received_events_url":"https://api.github.com/users/marcjansen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-01T07:30:53Z","updated_at":"2015-10-01T07:30:53Z","closed_at":null,"body":"In be2e4a3 (a part of #4192) the condition of an `else if`-branch in the translate interaction has been changed because it that change in logic was \r\n\r\n> not drastic, avoids throwing\r\n\r\n[Comment by @tschaub](https://github.com/openlayers/ol3/pull/4192#issuecomment-144631900)\r\n\r\nPreviousy the relevant lines read\r\n\r\n```javascript\r\n// …\r\n} else if (goog.isNull(this.lastFeature_)) {\r\n  var geom = this.lastFeature_.getGeometry();\r\n  // …\r\n}\r\n```\r\n\r\nnow these lines read\r\n\r\n```javascript\r\n// …\r\n} else if (this.lastFeature_) {\r\n  var geom = this.lastFeature_.getGeometry();\r\n  // …\r\n}\r\n```\r\n\r\nI still wonder why this hasn't failed previously. Can this code ever be reached or is it useless in which case it should probably be removed?\r\n\r\nMaybe @Morgul or @elemoine can chime in here?"}}