mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-05 23:29:00 +02:00
Merge pull request #8237 from overleaf/em-halt-on-error
Stop on first error dropdown UI GitOrigin-RevId: 5191a37f6c227ff5a91c10ce965832e1702c3931
This commit is contained in:
@@ -884,6 +884,21 @@ const ProjectController = {
|
||||
}
|
||||
)
|
||||
},
|
||||
stopOnFirstErrorAssignment(cb) {
|
||||
SplitTestHandler.getAssignment(
|
||||
req,
|
||||
res,
|
||||
'stop-on-first-error',
|
||||
(error, assignment) => {
|
||||
// do not fail editor load if assignment fails
|
||||
if (error) {
|
||||
cb(null, { variant: 'default' })
|
||||
} else {
|
||||
cb(null, assignment)
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
},
|
||||
(
|
||||
err,
|
||||
@@ -900,6 +915,7 @@ const ProjectController = {
|
||||
pdfDetachAssignment,
|
||||
pdfjsAssignment,
|
||||
dictionaryEditorAssignment,
|
||||
stopOnFirstErrorAssignment,
|
||||
}
|
||||
) => {
|
||||
if (err != null) {
|
||||
@@ -1017,6 +1033,9 @@ const ProjectController = {
|
||||
!userIsMemberOfGroupSubscription &&
|
||||
!userHasInstitutionLicence
|
||||
|
||||
const showStopOnFirstError =
|
||||
stopOnFirstErrorAssignment.variant === 'enabled'
|
||||
|
||||
const template =
|
||||
detachRole === 'detached'
|
||||
? 'project/editor_detached'
|
||||
@@ -1082,6 +1101,7 @@ const ProjectController = {
|
||||
debugPdfDetach,
|
||||
showNewSourceEditorOption,
|
||||
showSymbolPalette,
|
||||
showStopOnFirstError,
|
||||
trackPdfDownload: partOfPdfCachingRollout('collect-metrics'),
|
||||
enablePdfCaching: partOfPdfCachingRollout('enable-caching'),
|
||||
resetServiceWorker:
|
||||
|
||||
Reference in New Issue
Block a user