Don't force user to cm6 if they have ace as editor preference

GitOrigin-RevId: 78390fe420eb28b5731cb1cc719a0b53913509e1
This commit is contained in:
M Fahru 2022-11-08 18:43:09 -07:00 committed by Copybot
parent efd2669cc7
commit ff944917a6

View file

@ -176,6 +176,19 @@ export default EditorManager = (function () {
return false
}
// We will be restarting the survey later after some time
// Until then, we won't force user to use cm6 if they already use ace
const showCM6SwitchAwaySurvey = false
if (!showCM6SwitchAwaySurvey) {
const sourceEditor = this.localStorage(
`editor.source_editor.${this.$scope.project_id}`
)
return sourceEditor === 'cm6' || sourceEditor == null
}
// the key will be changed when we decided to restart the survey
const hasSeenCM6SwitchAwaySurvey = this.localStorage(
'editor.has_seen_cm6_switch_away_survey'
)