From 314e74012044d4c205b394764c874a36f9d8ec07 Mon Sep 17 00:00:00 2001 From: huynl-96 Date: Wed, 24 Nov 2021 14:54:08 +0700 Subject: [PATCH] fix: `getAttribute` get called on undefined target user event --- src/components/vue-drag-resize.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/vue-drag-resize.js b/src/components/vue-drag-resize.js index 9e87056..2099856 100644 --- a/src/components/vue-drag-resize.js +++ b/src/components/vue-drag-resize.js @@ -299,11 +299,11 @@ export default { return; } - if (this.dragHandle && target.getAttribute('data-drag-handle') !== this._uid.toString()) { + if (this.dragHandle && target?.getAttribute('data-drag-handle') !== this._uid.toString()) { return; } - if (this.dragCancel && target.getAttribute('data-drag-cancel') === this._uid.toString()) { + if (this.dragCancel && target?.getAttribute('data-drag-cancel') === this._uid.toString()) { return; }