Skip to content

Commit b693721

Browse files
committed
Don’t let copilots assign to themselves
1 parent 5f2fad4 commit b693721

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/components/ChallengeEditor/index.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,13 +1576,15 @@ class ChallengeEditor extends Component {
15761576
<div className={styles.bottomContainer}>
15771577
{!isLoading && <LastSavedDisplay timeLastSaved={draftChallenge.data.updated} />}
15781578
{!isLoading && (!isActive) && (!isCompleted) && <div className={styles.buttonContainer}>
1579-
<div className={styles.button}>
1580-
{!this.state.hasValidationErrors ? (
1581-
<PrimaryButton text={isSaving ? 'Saving...' : 'Save Draft'} type={'info'} onClick={this.createDraftHandler} />
1582-
) : (
1583-
<PrimaryButton text={'Save Draft'} type={'disabled'} />
1584-
)}
1585-
</div>
1579+
{(!preventCopilotFromActivatingTask) && (
1580+
<div className={styles.button}>
1581+
{!this.state.hasValidationErrors ? (
1582+
<PrimaryButton text={isSaving ? 'Saving...' : 'Save Draft'} type={'info'} onClick={this.createDraftHandler} />
1583+
) : (
1584+
<PrimaryButton text={'Save Draft'} type={'disabled'} />
1585+
)}
1586+
</div>
1587+
)}
15861588
{
15871589
(
15881590
isDraft &&

0 commit comments

Comments
 (0)