소스 검색

Native Error class does not accepts object as the second parameter.

Piotr Jasiun 8 년 전
부모
커밋
1d87e8eaf7
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      packages/ckeditor5-engine/src/dev-utils/model.js

+ 2 - 2
packages/ckeditor5-engine/src/dev-utils/model.js

@@ -336,7 +336,7 @@ function convertToModelElement() {
 		const elementName = data.viewItem.name;
 
 		if ( !conversionApi.schema.checkChild( data.cursorPosition, elementName ) ) {
-			throw new Error( `Element '${ elementName }' was not allowed in given position.`, { position: data.cursorPosition } );
+			throw new Error( `Element '${ elementName }' was not allowed in given position.` );
 		}
 
 		// View attribute value is a string so we want to typecast it to the original type.
@@ -360,7 +360,7 @@ function convertToModelElement() {
 function convertToModelText( withAttributes = false ) {
 	return ( evt, data, conversionApi ) => {
 		if ( !conversionApi.schema.checkChild( data.cursorPosition, '$text' ) ) {
-			throw new Error( 'Text was not allowed in given position.', { position: data.cursorPosition } );
+			throw new Error( 'Text was not allowed in given position.' );
 		}
 
 		let node;