From ae75801033503d4c9814f588ff68a2e5efbcba02 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 30 May 2022 17:19:23 +0200 Subject: [PATCH] Fix error TypeError: Cannot read properties of null (reading '0') --- api/js/egw_action/egw_action_dragdrop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/egw_action/egw_action_dragdrop.js b/api/js/egw_action/egw_action_dragdrop.js index 68e6e8d6f2..402036c9b6 100644 --- a/api/js/egw_action/egw_action_dragdrop.js +++ b/api/js/egw_action/egw_action_dragdrop.js @@ -155,7 +155,7 @@ export function egwDragActionImplementation() ai.doRegisterAction = function(_aoi, _callback, _context) { - var node = _aoi.getDOMNode()[0] ? _aoi.getDOMNode()[0] : _aoi.getDOMNode(); + var node = _aoi.getDOMNode() && _aoi.getDOMNode()[0] ? _aoi.getDOMNode()[0] : _aoi.getDOMNode(); if (node) { @@ -450,7 +450,7 @@ export function egwDropActionImplementation() ai.doRegisterAction = function(_aoi, _callback, _context) { - var node = _aoi.getDOMNode()[0] ? _aoi.getDOMNode()[0] : _aoi.getDOMNode(); + var node = _aoi.getDOMNode() && _aoi.getDOMNode()[0] ? _aoi.getDOMNode()[0] : _aoi.getDOMNode(); var self = this; if (node) {