Skip to content

Commit

Permalink
fix(AlertEditor): prevent publish toggle before affectedEntities are …
Browse files Browse the repository at this point in the history
…added
  • Loading branch information
landonreed committed Mar 14, 2017
1 parent 2fe9e37 commit 74eab22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/alerts/components/AlertEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class AlertEditor extends React.Component {
if (aName > bName) return 1
return 0
}
const canPublish = checkEntitiesForFeeds(alert.affectedEntities, publishableFeeds)
const canPublish = alert.affectedEntities.length && checkEntitiesForFeeds(alert.affectedEntities, publishableFeeds)
const canEdit = checkEntitiesForFeeds(alert.affectedEntities, editableFeeds)

const editingIsDisabled = alert.published && !canPublish ? true : !canEdit
Expand Down

0 comments on commit 74eab22

Please sign in to comment.