File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ if (PasteAction) {
229
229
if ( focusedEditor && focusedEditor . hasTextFocus ( ) ) {
230
230
const result = focusedEditor . getContainerDomNode ( ) . ownerDocument . execCommand ( 'paste' ) ;
231
231
if ( result ) {
232
- return CopyPasteController . get ( focusedEditor ) . finishedPaste ( ) ;
232
+ return CopyPasteController . get ( focusedEditor ) ? .finishedPaste ( ) ?? Promise . resolve ( ) ;
233
233
} else if ( platform . isWeb ) {
234
234
// Use the clipboard service if document.execCommand('paste') was not successful
235
235
return ( async ( ) => {
Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ export class CopyPasteController extends Disposable implements IEditorContributi
51
51
52
52
public static readonly ID = 'editor.contrib.copyPasteActionController' ;
53
53
54
- public static get ( editor : ICodeEditor ) : CopyPasteController {
55
- return editor . getContribution < CopyPasteController > ( CopyPasteController . ID ) ! ;
54
+ public static get ( editor : ICodeEditor ) : CopyPasteController | null {
55
+ return editor . getContribution < CopyPasteController > ( CopyPasteController . ID ) ;
56
56
}
57
57
58
58
private readonly _editor : ICodeEditor ;
You can’t perform that action at this time.
0 commit comments