File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " vscode-web-visual-editor" ,
3- "version" : " 0.1.8 " ,
3+ "version" : " 0.1.9 " ,
44 "displayName" : " Web Visual Editor" ,
55 "description" : " Edit HTML files visually." ,
66 "categories" : [
Original file line number Diff line number Diff line change @@ -290,7 +290,11 @@ export class VisualEditorProvider implements vscode.CustomTextEditorProvider {
290290 document . querySelectorAll ( 'body *, body' ) . forEach ( el => {
291291 // Add source code location information to all elements in body
292292 const location = dom . nodeLocation ( el ) ;
293- if ( ! location ) { throw Error ( `Failed to get nodeLocation of element ${ el } ` ) ; }
293+ if ( ! location ) {
294+ // NOTE `location` can be null if the element is implicitly inserted
295+ // according to the HTML specification (e.g., `table > tbody`).
296+ return ;
297+ }
294298 el . setAttribute ( 'data-wve-code-start' , location . startOffset . toString ( ) ) ;
295299 el . setAttribute ( 'data-wve-code-end' , location . endOffset . toString ( ) ) ;
296300 } ) ;
You canβt perform that action at this time.
0 commit comments