Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 727f70c

Browse files
committed
Add sanity checks
1 parent 65bab8b commit 727f70c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dd-resizable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt
249249
const offsetX = event.clientX - oEvent.clientX;
250250
const offsetY = event.clientY - oEvent.clientY;
251251

252-
if (typeof fixedAspectRatio !== 'undefined')
252+
if (typeof fixedAspectRatio !== 'undefined' && fixedAspectRatio != 0 && !isNaN(fixedAspectRatio) && isFinite(fixedAspectRatio))
253253
{
254254
if (dir.indexOf('e') > -1) {
255255
newRect.width += offsetX;

0 commit comments

Comments
 (0)