File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -855,7 +855,9 @@ the specific language governing permissions and limitations under the Apache Lic
855855
856856 if ( element . length && element [ 0 ] . detachEvent && self . _sync ) {
857857 element . each ( function ( ) {
858- this . detachEvent ( "onpropertychange" , self . _sync ) ;
858+ if ( self . _sync ) {
859+ this . detachEvent ( "onpropertychange" , self . _sync ) ;
860+ }
859861 } ) ;
860862 }
861863 if ( this . propertyObserver ) {
@@ -1116,11 +1118,15 @@ the specific language governing permissions and limitations under the Apache Lic
11161118 if ( readonly === undefined ) readonly = false ;
11171119 this . readonly ( readonly ) ;
11181120
1119- syncCssClasses ( this . container , this . opts . element , this . opts . adaptContainerCssClass ) ;
1120- this . container . addClass ( evaluate ( this . opts . containerCssClass , this . opts . element ) ) ;
1121+ if ( this . container ) {
1122+ syncCssClasses ( this . container , this . opts . element , this . opts . adaptContainerCssClass ) ;
1123+ this . container . addClass ( evaluate ( this . opts . containerCssClass , this . opts . element ) ) ;
1124+ }
11211125
1122- syncCssClasses ( this . dropdown , this . opts . element , this . opts . adaptDropdownCssClass ) ;
1123- this . dropdown . addClass ( evaluate ( this . opts . dropdownCssClass , this . opts . element ) ) ;
1126+ if ( this . dropdown ) {
1127+ syncCssClasses ( this . dropdown , this . opts . element , this . opts . adaptDropdownCssClass ) ;
1128+ this . dropdown . addClass ( evaluate ( this . opts . dropdownCssClass , this . opts . element ) ) ;
1129+ }
11241130
11251131 } ) ;
11261132
You can’t perform that action at this time.
0 commit comments