File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -596,6 +596,14 @@ export class Context<
596
596
597
597
try {
598
598
await this . _manager . ready ;
599
+ if ( this . _model . collaborative ) {
600
+ // Files cannot be saved in collaborative mode. The "save" command
601
+ // is disabled in the UI, but if the user tries to save anyway, act
602
+ // as though it succeeded.
603
+ this . _saveState . emit ( 'completed' ) ;
604
+ return Promise . resolve ( ) ;
605
+ }
606
+
599
607
const value = await this . _maybeSave ( options ) ;
600
608
if ( this . isDisposed ) {
601
609
return ;
@@ -792,7 +800,7 @@ export class Context<
792
800
}
793
801
794
802
/**
795
- * Add a checkpoint the file is writable.
803
+ * Add a checkpoint if the file is writable.
796
804
*/
797
805
private _maybeCheckpoint ( force : boolean ) : Promise < void > {
798
806
let promise = Promise . resolve ( void 0 ) ;
You can’t perform that action at this time.
0 commit comments