Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 29cba1d

Browse files
myan9starpit
authored andcommitted
fix(plugins/plugin-electron-components): UpdateChecker should ignore prereleases
Fixes #6655
1 parent a2c0c2b commit 29cba1d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

plugins/plugin-electron-components/src/components/UpdateChecker.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,15 @@ export default class UpdateChecker extends React.PureComponent<Props, State> {
122122
private checkForUpdates() {
123123
needle('get', FEED, { json: true })
124124
.then(res => {
125-
const entryForLatestVersion = res.body.children.filter(_ => _.name === 'entry')[0]
125+
const entryForLatestVersion = res.body.children
126+
.filter(_ => _.name === 'entry')
127+
.find(_ =>
128+
_.children.find(
129+
_ =>
130+
_.name === 'title' && !_.value.includes('beta') && !_.value.includes('alpha') && !_.value.includes('rc')
131+
)
132+
)
133+
126134
this.setState({
127135
entryForLatestVersion: {
128136
title: this.atomValueFor('title', res.body),

0 commit comments

Comments
 (0)