소스 검색

Internal: Updated the usage of UI components which are now driven by synchronous initialization and destruction (see https://github.com/ckeditor/ckeditor5-ui/issues/225).

Piotrek Koszuliński 8 년 전
부모
커밋
bce50f651f
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      packages/ckeditor5-upload/src/ui/filedialogbuttonview.js
  2. 3 3
      packages/ckeditor5-upload/tests/ui/filedialogbuttonview.js

+ 1 - 1
packages/ckeditor5-upload/src/ui/filedialogbuttonview.js

@@ -80,7 +80,7 @@ export default class FileDialogButtonView extends ButtonView {
 	destroy() {
 		document.body.removeChild( this.fileInputView.element );
 
-		return super.destroy();
+		super.destroy();
 	}
 }
 

+ 3 - 3
packages/ckeditor5-upload/tests/ui/filedialogbuttonview.js

@@ -28,9 +28,9 @@ describe( 'FileDialogButtonView', () => {
 	} );
 
 	it( 'should remove input view from body after destroy', () => {
-		return view.destroy().then( () => {
-			expect( view.fileInputView.element.parentNode ).to.be.null;
-		} );
+		view.destroy();
+
+		expect( view.fileInputView.element.parentNode ).to.be.null;
 	} );
 
 	it( 'should open file dialog on execute', () => {