Skip to content

Commit

Permalink
distinct urlTags vs notes
Browse files Browse the repository at this point in the history
  • Loading branch information
ppot committed Jan 23, 2018
1 parent af527b6 commit 43e7fd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion app/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ module.exports = win => {
const {rpc} = win;

const onupdate = (ev, releaseNotes, releaseName, date, updateUrl, onQuitAndInstall) => {
const releaseUrl = updateUrl || `https://github.com/zeit/hyper/releases/tag/${releaseName}`;
const releaseUrl = {
file: updateUrl || undefined,
tag: `https://github.com/zeit/hyper/releases/tag/${releaseName}`
};
rpc.emit('update available', {releaseNotes, releaseName, releaseUrl, canInstall: !!onQuitAndInstall});
};

Expand Down
4 changes: 2 additions & 2 deletions lib/components/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class Notifications extends PureComponent {
window.require('electron').shell.openExternal(ev.target.href);
ev.preventDefault();
}}
href={this.props.updateReleaseUrl}
href={this.props.updateReleaseUrl.tag}
>
notes
</a>).{' '}
Expand All @@ -106,7 +106,7 @@ export default class Notifications extends PureComponent {
window.require('electron').shell.openExternal(ev.target.href);
ev.preventDefault();
}}
href={this.props.updateReleaseUrl}
href={this.props.updateReleaseUrl.file}
>
Download
</a>
Expand Down

0 comments on commit 43e7fd7

Please sign in to comment.