Skip to content

Commit

Permalink
(refactor) Convert download href to string template.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjaffeback committed Aug 22, 2018
1 parent d7b2b8c commit 6ccd765
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/views/home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const UploadFile = Loadable({
class HomeView extends Component {
download = (csvText, trackNumber) => {
const element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(csvText));
element.setAttribute('href', `data:text/plain;charset=utf-8,${encodeURIComponent(csvText)}`);
element.setAttribute('download', `DroneTrack ${trackNumber.toString()}.txf`);

element.style.display = 'none';
Expand Down

0 comments on commit 6ccd765

Please sign in to comment.