File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,7 +169,9 @@ export class ComboBoxScroller extends PolymerElement {
169169 }
170170
171171 requestContentUpdate ( ) {
172- this . __virtualizer . update ( ) ;
172+ if ( this . __virtualizer ) {
173+ this . __virtualizer . update ( ) ;
174+ }
173175 }
174176
175177 scrollIntoView ( index ) {
Original file line number Diff line number Diff line change 1+ import { expect } from '@esm-bundle/chai' ;
2+ import './not-animated-styles.js' ;
3+ import '../vaadin-combo-box.js' ;
4+ import { html } from '@polymer/polymer' ;
5+ import { templatize } from '@polymer/polymer/lib/utils/templatize.js' ;
6+
7+ it ( 'should not throw when templatized' , ( ) => {
8+ // Use Templatizer to create a new combo-box instance
9+ const TemplateClass = templatize ( html `< vaadin-combo-box > </ vaadin-combo-box > ` ) ;
10+ const instance = new TemplateClass ( ) ;
11+ const comboBox = instance . root . querySelector ( 'vaadin-combo-box' ) ;
12+ // Add the new combo-box instance to the document body
13+ expect ( ( ) => document . body . appendChild ( comboBox ) ) . not . to . throw ( ) ;
14+
15+ // Clean up
16+ comboBox . remove ( ) ;
17+ } ) ;
You can’t perform that action at this time.
0 commit comments