Skip to content

Commit 27351b8

Browse files
committed
Build: Tests fix
1 parent f885392 commit 27351b8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

ui/widgets/resizable.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,15 @@ $.widget( "ui.resizable", $.ui.mouse, {
9494
// TODO: determine which cases actually cause this to happen
9595
// if the element doesn't have the scroll set, see if it's possible to
9696
// set the scroll
97-
el[ scroll ] = 1;
98-
has = ( el[ scroll ] > 0 );
99-
el[ scroll ] = 0;
97+
try {
98+
el[ scroll ] = 1;
99+
has = ( el[ scroll ] > 0 );
100+
el[ scroll ] = 0;
101+
} catch ( e ) {
102+
103+
// `el` might be a string, then setting `scroll` will throw
104+
// an error in strict mode; ignore it.
105+
}
100106
return has;
101107
},
102108

0 commit comments

Comments
 (0)